mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
vim-patch:8.1.2222: accessing invalid memory
Problem: Accessing invalid memory. (Dominique Pelle)
Solution: Reset highlight_match every time. (closes vim/vim#5125)
7ab5d77666
This commit is contained in:
@@ -557,6 +557,7 @@ static void may_do_incsearch_highlighting(int firstc, long count,
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_screen(SOME_VALID);
|
update_screen(SOME_VALID);
|
||||||
|
highlight_match = false;
|
||||||
restore_last_search_pattern();
|
restore_last_search_pattern();
|
||||||
|
|
||||||
// Leave it at the end to make CTRL-R CTRL-W work. But not when beyond the
|
// Leave it at the end to make CTRL-R CTRL-W work. But not when beyond the
|
||||||
@@ -1549,6 +1550,7 @@ static int may_do_command_line_next_incsearch(int firstc, long count,
|
|||||||
highlight_match = true;
|
highlight_match = true;
|
||||||
save_viewstate(&s->old_viewstate);
|
save_viewstate(&s->old_viewstate);
|
||||||
update_screen(NOT_VALID);
|
update_screen(NOT_VALID);
|
||||||
|
highlight_match = false;
|
||||||
redrawcmdline();
|
redrawcmdline();
|
||||||
curwin->w_cursor = s->match_end;
|
curwin->w_cursor = s->match_end;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user