1
0
forked from aniani/vim

patch 8.1.0284: 'cursorline' highlighting wrong with 'incsearch'

Problem:    'cursorline' highlighting wrong with 'incsearch'.
Solution:   Move the cursor back if the match is outside the range.
This commit is contained in:
Bram Moolenaar
2018-08-14 18:16:52 +02:00
parent 80d83c094d
commit 2f6a346a4c
5 changed files with 38 additions and 0 deletions

View File

@@ -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)