changeset 18457:71199e360948 v8.1.2222

patch 8.1.2222: accessing invalid memory Commit: https://github.com/vim/vim/commit/7ab5d77666c98f5229759402a451a26ea57a4801 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 26 20:45:24 2019 +0200 patch 8.1.2222: accessing invalid memory Problem: Accessing invalid memory. (Dominique Pelle) Solution: Reset highlight_match every time. (closes https://github.com/vim/vim/issues/5125)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Oct 2019 21:00:04 +0200
parents 6d11fc4aa683
children 7f89c8cf9949
files src/ex_getln.c src/version.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -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;
     }
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2222,
+/**/
     2221,
 /**/
     2220,