patch 9.0.1092: search error message doesn't show used pattern
Problem: Search error message doesn't show used pattern.
Solution: Pass the actually used pattern to where the error message is
given. (Rob Pilling, closes #11742)
diff --git a/src/testdir/test_global.vim b/src/testdir/test_global.vim
index 1c76642..34857b2 100644
--- a/src/testdir/test_global.vim
+++ b/src/testdir/test_global.vim
@@ -92,6 +92,18 @@
close!
endfunc
+func Test_global_empty_pattern()
+ " populate history
+ silent g/hello/
+
+ redir @a
+ g//
+ redir END
+
+ call assert_match('Pattern not found: hello', @a)
+ " ^~~~~ this was previously empty
+endfunc
+
" Test for global command with newline character
func Test_global_newline()
new