patch 8.1.0321: 'incsearch' regression: /\v highlights everything
Problem: 'incsearch' regression: /\v highlights everything.
Solution: Put back the empty_pattern() check.
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 1cb3c8b..7f748cb 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -572,6 +572,17 @@
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)