summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-14 18:16:52 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-14 18:16:52 +0200
commit2f6a346a4cd2d5bdd6dc9b3209ebce7b6340221d (patch)
tree9fcf5bd2bd4297a2b80608ae0f70aa68a259081a /src/ex_getln.c
parent80d83c094d52b9983ef316b1a08c314060ca8313 (diff)
patch 8.1.0284: 'cursorline' highlighting wrong with 'incsearch'v8.1.0284
Problem: 'cursorline' highlighting wrong with 'incsearch'. Solution: Move the cursor back if the match is outside the range.
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index a8c5cfb001..ba6fe729c7 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -480,8 +480,11 @@ may_do_incsearch_highlighting(
if (curwin->w_cursor.lnum < search_first_line
|| curwin->w_cursor.lnum > search_last_line)
+ {
// match outside of address range
i = 0;
+ curwin->w_cursor = is_state->search_start;
+ }
// if interrupted while searching, behave like it failed
if (got_int)