0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.1.0399: 'hlsearch' highlight remains in other window

Problem:    'hlsearch' highlight remains in other window after cancelling
            command.
Solution:   Redraw all windows. Also remove unnecessary delays. (closes #3437)
This commit is contained in:
Bram Moolenaar
2018-09-16 17:08:04 +02:00
parent 8f4499b816
commit 65985ac998
6 changed files with 43 additions and 20 deletions

View File

@@ -445,10 +445,9 @@ finish_incsearch_highlighting(
p_magic = is_state->magic_save;
validate_cursor(); /* needed for TAB */
redraw_all_later(SOME_VALID);
if (call_update_screen)
update_screen(SOME_VALID);
else
redraw_all_later(SOME_VALID);
}
}
@@ -589,8 +588,11 @@ may_do_incsearch_highlighting(
{
next_char = ccline.cmdbuff[skiplen + patlen];
ccline.cmdbuff[skiplen + patlen] = NUL;
if (empty_pattern(ccline.cmdbuff))
if (empty_pattern(ccline.cmdbuff) && !no_hlsearch)
{
redraw_all_later(SOME_VALID);
set_no_hlsearch(TRUE);
}
ccline.cmdbuff[skiplen + patlen] = next_char;
}