From 3b9bd7bd439a31f393746e01e25291dd0543630d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 24 Dec 2022 07:55:03 +0800 Subject: 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 --- src/nvim/testdir/test_global.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir') 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 -- cgit