Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
14541:1b398feddc25 | 14542:116a01c73fd8 |
---|---|
478 ccline.cmdbuff[skiplen + patlen] = next_char; | 478 ccline.cmdbuff[skiplen + patlen] = next_char; |
479 --emsg_off; | 479 --emsg_off; |
480 | 480 |
481 if (curwin->w_cursor.lnum < search_first_line | 481 if (curwin->w_cursor.lnum < search_first_line |
482 || curwin->w_cursor.lnum > search_last_line) | 482 || curwin->w_cursor.lnum > search_last_line) |
483 { | |
483 // match outside of address range | 484 // match outside of address range |
484 i = 0; | 485 i = 0; |
486 curwin->w_cursor = is_state->search_start; | |
487 } | |
485 | 488 |
486 // if interrupted while searching, behave like it failed | 489 // if interrupted while searching, behave like it failed |
487 if (got_int) | 490 if (got_int) |
488 { | 491 { |
489 (void)vpeekc(); // remove <C-C> from input stream | 492 (void)vpeekc(); // remove <C-C> from input stream |