zed/crates/vim/src
Liber 068d64edd6
vim: Fix n/N and */# selecting text after cmd+f search (#54027)
The cmd_f_search flag introduced in #51073 was never cleared when
switching to vim-style search commands, causing collapse_matches to
remain false and match ranges to appear as visual selections.

Reset cmd_f_search when n/N or */# are used, restore Normal mode if
Visual was entered due to the non-collapsed selection, and fix an early
return in visual select_match that leaked collapse_matches.

Fixes #53896

Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-05-20 03:39:36 +00:00
..
digraph
helix vim: Fix panic when pasting in read-only editor (#55608) 2026-05-04 10:17:14 +00:00
normal vim: Fix n/N and */# selecting text after cmd+f search (#54027) 2026-05-20 03:39:36 +00:00
test editor: Fix soft-wrap in auto-height editors (#54051) 2026-04-18 00:55:44 +02:00
change_list.rs editor: Remove buffer and display map fields from SelectionsCollection (#42175) 2025-11-07 11:21:14 +01:00
command.rs Merge gpui::Task and scheduler::Task (#53674) 2026-05-05 22:41:13 +00:00
digraph.rs vim: Downgrade user config error from panic to log (#42070) 2025-11-06 08:37:04 +00:00
helix.rs vim: Add Helix jump-to-word support to Vim mode (#55492) 2026-05-12 21:46:18 +00:00
indent.rs Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
insert.rs Reduce amount of monomorphizations from FnMut closures (#49453) 2026-02-18 12:00:02 +01:00
mode_indicator.rs Make all status bar tools able to hide its button via UI (#54971) 2026-05-08 10:36:03 +00:00
motion.rs vim: Add C preprocessor check in matching function (#55515) 2026-05-07 04:25:42 +00:00
normal.rs Merge gpui::Task and scheduler::Task (#53674) 2026-05-05 22:41:13 +00:00
object.rs vim: Change surrounds with Mini{Quotes,Brackets} and AnyQuotes (#51067) 2026-05-09 04:10:54 +00:00
replace.rs Improve clipboard support on Windows (#51807) 2026-03-18 22:09:26 -04:00
rewrap.rs editor: Extract rewrap and config out of editor.rs (#55855) 2026-05-06 11:57:36 +00:00
state.rs vim: Add Helix jump-to-word support to Vim mode (#55492) 2026-05-12 21:46:18 +00:00
surrounds.rs vim: Change surrounds with Mini{Quotes,Brackets} and AnyQuotes (#51067) 2026-05-09 04:10:54 +00:00
test.rs Vim/Helix: Prevent undo grouping when any LSP completion (#53980) 2026-05-14 06:39:33 +00:00
vim.rs vim: Add Helix jump-to-word support to Vim mode (#55492) 2026-05-12 21:46:18 +00:00
visual.rs vim: Fix n/N and */# selecting text after cmd+f search (#54027) 2026-05-20 03:39:36 +00:00