Skip to content

Commit 7ab5d77

Browse files
committed
patch 8.1.2222: accessing invalid memory
Problem: Accessing invalid memory. (Dominique Pelle) Solution: Reset highlight_match every time. (closes #5125)
1 parent 96f45c0 commit 7ab5d77

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/ex_getln.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ may_do_incsearch_highlighting(
525525
curwin->w_redr_status = TRUE;
526526

527527
update_screen(SOME_VALID);
528+
highlight_match = FALSE;
528529
restore_last_search_pattern();
529530

530531
// 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(
642643
highlight_match = TRUE;
643644
save_viewstate(&is_state->old_viewstate);
644645
update_screen(NOT_VALID);
646+
highlight_match = FALSE;
645647
redrawcmdline();
646648
curwin->w_cursor = is_state->match_end;
647649
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
2222,
744746
/**/
745747
2221,
746748
/**/

0 commit comments

Comments
 (0)