fix: clear search highlighting on Normal escape

This commit is contained in:
Valdemar Lorenzen
2026-10-15 12:21:17 +02:00
parent de62467208
commit adc44d22db
3 changed files with 51 additions and 3 deletions
+2
View File
@@ -176,6 +176,8 @@ Normal `*` highlights the primary caret's word without moving any caret when it
`n`/`N` and an empty `/` submission retain the whole-word setting; a nonempty `/` query returns to literal substring search. Cancelling `/` preserves both the previous query and its matching behavior.
Normal-mode Escape hides search highlights without forgetting the query or matching mode. The next `*` re-highlights without moving; `n`/`N` or submitting `/` resumes navigation and restores highlighting. Escape used to cancel a prompt, selection, or pending motion keeps its existing behavior.
Submitting an empty search repeats the last query. Esc cancels without moving the cursor or replacing the previous query/match. A missing match reports the query and leaves the cursor unchanged; searching without a previous query also leaves the cursor unchanged. Search never edits text or adds undo history. Buffer edits and undo/redo retain the query and recompute its visible highlights, so subsequent navigation searches the current text again.
## Commands, saving, and pasted input