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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user