Mercurial > vim
diff src/ex_getln.c @ 14542:116a01c73fd8 v8.1.0284
patch 8.1.0284: 'cursorline' highlighting wrong with 'incsearch'
commit https://github.com/vim/vim/commit/2f6a346a4cd2d5bdd6dc9b3209ebce7b6340221d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 14 18:16:52 2018 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 14 Aug 2018 18:30:06 +0200 |
parents | 213f1a519378 |
children | 2b2d7ae42fb8 |
line wrap: on
line diff
--- 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)