mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 00:51:53 +00:00
fix(cmdline): validate 'incsearch' cursor for "cmdline_show" redraw (#34630)
Problem: "cmdline_show" event may be emitted with an invalid cursor
position, causing a redraw that will clear the match highlight.
Solution: Mark the cursor position as valid so that a "cmdline_show"
callback that updates the screen does not clear the match highlight.
This commit is contained in:
@@ -556,6 +556,7 @@ static void may_do_incsearch_highlighting(int firstc, int count, incsearch_state
|
||||
curwin->w_cursor = s->search_start;
|
||||
} else if (found != 0) {
|
||||
curwin->w_cursor = end_pos;
|
||||
curwin->w_valid_cursor = end_pos; // mark as valid for cmdline_show redraw
|
||||
}
|
||||
|
||||
msg_starthere();
|
||||
|
||||
Reference in New Issue
Block a user