summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-11 19:02:22 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-11 19:02:22 +0200
commitef73a28401cde680dc0d02d4b0fb19ed659ec1d3 (patch)
tree1b07542bf7ddad491894d5293137fa661534ee32 /src/ex_getln.c
parentd473c8c101262702ea9eeb14907ee20a786942b2 (diff)
patch 8.1.0273: invalid memory access when using 'incsearch'v8.1.0273
Problem: Invalid memory access when using 'incsearch'. Solution: Reset "patlen" when using previous search pattern.
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index c2eb0a8dda..3fb9c86233 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -504,7 +504,11 @@ may_adjust_incsearch_highlighting(
return FAIL;
if (firstc == ccline.cmdbuff[skiplen])
+ {
pat = last_search_pattern();
+ skiplen = 0;
+ patlen = STRLEN(pat);
+ }
else
pat = ccline.cmdbuff + skiplen;