0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.1.2222: accessing invalid memory

Problem:    Accessing invalid memory. (Dominique Pelle)
Solution:   Reset highlight_match every time.  (closes #5125)
This commit is contained in:
Bram Moolenaar 2019-10-26 20:45:24 +02:00
parent 96f45c0b6f
commit 7ab5d77666
2 changed files with 4 additions and 0 deletions

View File

@ -525,6 +525,7 @@ may_do_incsearch_highlighting(
curwin->w_redr_status = TRUE;
update_screen(SOME_VALID);
highlight_match = FALSE;
restore_last_search_pattern();
// Leave it at the end to make CTRL-R CTRL-W work. But not when beyond the
@ -642,6 +643,7 @@ may_adjust_incsearch_highlighting(
highlight_match = TRUE;
save_viewstate(&is_state->old_viewstate);
update_screen(NOT_VALID);
highlight_match = FALSE;
redrawcmdline();
curwin->w_cursor = is_state->match_end;
}

View File

@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2222,
/**/
2221,
/**/