vim-patch:8.2.4328: command line complete matches cleard when typing character

Problem:    Command line complete matches cleard when typing character.
            (Dominique Pellé)
Solution:   Only remove a popup menu if there is one.
73a16c22a4
This commit is contained in:
zeertzjq 2022-08-22 08:31:21 +08:00
parent c086bf6079
commit 99bd895956
2 changed files with 44 additions and 2 deletions

View File

@ -2024,6 +2024,15 @@ func Test_wildmenu_pum()
call TermWait(buf)
call VerifyScreenDump(buf, 'Test_wildmenu_pum_29', {})
" Check "list" still works
call term_sendkeys(buf, "\<C-U>set wildmode=longest,list\<CR>")
call term_sendkeys(buf, ":cn\<Tab>")
call TermWait(buf)
call VerifyScreenDump(buf, 'Test_wildmenu_pum_30', {})
call term_sendkeys(buf, "s")
call TermWait(buf)
call VerifyScreenDump(buf, 'Test_wildmenu_pum_31', {})
call term_sendkeys(buf, "\<C-U>\<CR>")
call StopVimInTerminal(buf)
call delete('Xtest')

View File

@ -2160,6 +2160,38 @@ describe('builtin popupmenu', function()
feed('<esc>')
-- Check "list" still works
command('set wildmode=longest,list')
feed(':cn<Tab>')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{4: }|
:cn |
cnewer cnoreabbrev |
cnext cnoremap |
cnfile cnoremenu |
:cn^ |
]])
feed('s')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{4: }|
:cn |
cnewer cnoreabbrev |
cnext cnoremap |
cnfile cnoremenu |
:cns^ |
]])
feed('<esc>')
command('set wildmode=full')
-- check positioning with multibyte char in pattern
command("e långfile1")
command("sp långfile2")
@ -2229,11 +2261,12 @@ describe('builtin popupmenu', function()
:b långfile^ |
]])
-- special case: when patterns ends with "/", show menu items aligned
-- after the "/"
feed('<esc>')
command("close")
command('set wildmode=full')
-- special case: when patterns ends with "/", show menu items aligned
-- after the "/"
feed(':e compdir/<tab>')
screen:expect([[
|