aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-09 11:31:02 +0800
committerGitHub <noreply@github.com>2022-12-09 11:31:02 +0800
commitb5edea6553b4c1b5dd3530061d907848d7272d8c (patch)
tree492e7e36b822bd63e72f5c868abe6affd38ac7d3
parentf69d531d84c52ed71b6b9dd9b05a077ca8896ff6 (diff)
downloadrneovim-b5edea6553b4c1b5dd3530061d907848d7272d8c.tar.gz
rneovim-b5edea6553b4c1b5dd3530061d907848d7272d8c.tar.bz2
rneovim-b5edea6553b4c1b5dd3530061d907848d7272d8c.zip
vim-patch:9.0.0238: Shift-Tab shows matches on cmdline when 'wildmenu' is off (#21355)
Problem: Shift-Tab shows matches on cmdline when 'wildmenu' is off. Solution: Only show matches when 'wildmode' contains "list". (closes vim/vim#10951) https://github.com/vim/vim/commit/300175fd7f874be78826a00f5cb60a7ec2f20655 Code change has already been ported. Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--src/nvim/testdir/test_cmdline.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index c79aba810e..0ab82e6bcd 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -869,6 +869,24 @@ func Test_cmdline_complete_user_cmd()
call feedkeys(":Foo b\\x\<Tab>\<Home>\"\<cr>", 'tx')
call assert_equal('"Foo b\x', @:)
delcommand Foo
+
+ redraw
+ call assert_equal('~', Screenline(&lines - 1))
+ command! FooOne :
+ command! FooTwo :
+
+ set nowildmenu
+ call feedkeys(":Foo\<Tab>\<Home>\"\<cr>", 'tx')
+ call assert_equal('"FooOne', @:)
+ call assert_equal('~', Screenline(&lines - 1))
+
+ call feedkeys(":Foo\<S-Tab>\<Home>\"\<cr>", 'tx')
+ call assert_equal('"FooTwo', @:)
+ call assert_equal('~', Screenline(&lines - 1))
+
+ delcommand FooOne
+ delcommand FooTwo
+ set wildmenu&
endfunc
func Test_complete_user_cmd()