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)

300175fd7f

Code change has already been ported.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2022-12-09 11:31:02 +08:00 committed by GitHub
parent f69d531d84
commit b5edea6553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()