aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-15 02:03:04 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-15 23:00:35 -0400
commit2ed48e71d3a55ee95579df80e46f3fa40639d84a (patch)
treecc4ba7b19bab2fa2d9c8ae57cc0dcb6488e4e2ad /src
parentba16475549d4e9c8c0a0f1d28cfb3e4e5b3c1108 (diff)
downloadrneovim-2ed48e71d3a55ee95579df80e46f3fa40639d84a.tar.gz
rneovim-2ed48e71d3a55ee95579df80e46f3fa40639d84a.tar.bz2
rneovim-2ed48e71d3a55ee95579df80e46f3fa40639d84a.zip
vim-patch:8.1.2222: accessing invalid memory
Problem: Accessing invalid memory. (Dominique Pelle) Solution: Reset highlight_match every time. (closes vim/vim#5125) https://github.com/vim/vim/commit/7ab5d77666c98f5229759402a451a26ea57a4801
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_getln.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index fb305f927a..f9ca7bfa42 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -557,6 +557,7 @@ static void may_do_incsearch_highlighting(int firstc, long count,
}
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
@@ -1549,6 +1550,7 @@ static int may_do_command_line_next_incsearch(int firstc, long count,
highlight_match = true;
save_viewstate(&s->old_viewstate);
update_screen(NOT_VALID);
+ highlight_match = false;
redrawcmdline();
curwin->w_cursor = s->match_end;
} else {