diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-08-23 20:55:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-08-23 20:55:45 +0200 |
commit | 4edfe2d2a2d70ea66a7f73e9b923c2d1f6246a57 (patch) | |
tree | 5e1d553a935a4a4d35babfc7dc04ff27cb4b9d2c /src/ex_getln.c | |
parent | 8b0d5ce881ac16a36ea00018ba13a58b0fdb7534 (diff) | |
download | vim-git-4edfe2d2a2d70ea66a7f73e9b923c2d1f6246a57.tar.gz |
patch 8.1.0321: 'incsearch' regression: /\v highlights everythingv8.1.0321
Problem: 'incsearch' regression: /\v highlights everything.
Solution: Put back the empty_pattern() check.
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 1cb3c8b7a..7f748cb17 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -572,6 +572,17 @@ may_do_incsearch_highlighting( else end_pos = curwin->w_cursor; // shutup gcc 4 + // Disable 'hlsearch' highlighting if the pattern matches everything. + // Avoids a flash when typing "foo\|". + if (!use_last_pat) + { + next_char = ccline.cmdbuff[skiplen + patlen]; + ccline.cmdbuff[skiplen + patlen] = NUL; + if (empty_pattern(ccline.cmdbuff)) + set_no_hlsearch(TRUE); + ccline.cmdbuff[skiplen + patlen] = next_char; + } + validate_cursor(); // May redraw the status line to show the cursor position. if (p_ru && curwin->w_status_height > 0) |