]> granicus.if.org Git - vim/commitdiff
patch 8.1.2222: accessing invalid memory v8.1.2222
authorBram Moolenaar <Bram@vim.org>
Sat, 26 Oct 2019 18:45:24 +0000 (20:45 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 26 Oct 2019 18:45:24 +0000 (20:45 +0200)
Problem:    Accessing invalid memory. (Dominique Pelle)
Solution:   Reset highlight_match every time.  (closes #5125)

src/ex_getln.c
src/version.c

index 45a0a3632150fb80fc4520dcb5a5b16c6777be78..9c98f99babb5b0a5e411e699fe7599a096c3b97c 100644 (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;
     }
index 718ad6528f3cd0decea216aefb4362ac005dc1c3..2d0c84ec63dcfbb56be99bc97ed3c43aa44821fc 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2222,
 /**/
     2221,
 /**/