aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-24 07:55:03 +0800
committerGitHub <noreply@github.com>2022-12-24 07:55:03 +0800
commit3b9bd7bd439a31f393746e01e25291dd0543630d (patch)
tree46627d70f3c517991744caf0cd8def202441b7ed /src/nvim/testdir
parent3ea1524cf8a7d80d1034011462fd9611fdf385f1 (diff)
downloadrneovim-3b9bd7bd439a31f393746e01e25291dd0543630d.tar.gz
rneovim-3b9bd7bd439a31f393746e01e25291dd0543630d.tar.bz2
rneovim-3b9bd7bd439a31f393746e01e25291dd0543630d.zip
vim-patch:9.0.1092: search error message doesn't show used pattern (#21518)
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 vim/vim#11742) https://github.com/vim/vim/commit/e86190e7c1297da29d0fc2415fdeca5ecae8d2ba Co-authored-by: Rob Pilling <robpilling@gmail.com>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_global.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_global.vim b/src/nvim/testdir/test_global.vim
index 8fb4ee0cfa..44a8784348 100644
--- a/src/nvim/testdir/test_global.vim
+++ b/src/nvim/testdir/test_global.vim
@@ -72,6 +72,18 @@ func Test_global_print()
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