mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 05:46:12 +00:00
vim-patch:9.1.1739: Matches may be listed twice with wildmode=longest,list
Problem: Matches may be listed twice with wildmode=longest,list when
"longest" doesn't change command line (after 9.1.1737).
Solution: Set did_wild_list when trying "list" after "longest"
(zeertzjq).
closes: vim/vim#18227
a28a2eb9d9
This commit is contained in:
@@ -1195,6 +1195,9 @@ static int command_line_wildchar_complete(CommandLineState *s)
|
|||||||
nextwild(&s->xpc, WILD_NEXT, options, escape);
|
nextwild(&s->xpc, WILD_NEXT, options, escape);
|
||||||
}
|
}
|
||||||
showmatches(&s->xpc, p_wmnu, wim_list_next, wim_noselect_next);
|
showmatches(&s->xpc, p_wmnu, wim_list_next, wim_noselect_next);
|
||||||
|
if (wim_list_next) {
|
||||||
|
s->did_wild_list = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@@ -4517,7 +4517,7 @@ describe('builtin popupmenu', function()
|
|||||||
|
|
||||||
feed('<esc>')
|
feed('<esc>')
|
||||||
|
|
||||||
-- Check "list" still works
|
-- Check that when "longest" produces no result, "list" works
|
||||||
command('set wildmode=longest,list')
|
command('set wildmode=longest,list')
|
||||||
feed(':cn<Tab>')
|
feed(':cn<Tab>')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
@@ -4530,6 +4530,8 @@ describe('builtin popupmenu', function()
|
|||||||
cnfile cnoremenu |
|
cnfile cnoremenu |
|
||||||
:cn^ |
|
:cn^ |
|
||||||
]])
|
]])
|
||||||
|
feed('<Tab>')
|
||||||
|
screen:expect_unchanged()
|
||||||
feed('s')
|
feed('s')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
|
|
|
||||||
|
@@ -2900,6 +2900,8 @@ func Test_wildmenu_pum()
|
|||||||
call term_sendkeys(buf, "\<C-U>set wildmode=longest,list\<CR>")
|
call term_sendkeys(buf, "\<C-U>set wildmode=longest,list\<CR>")
|
||||||
call term_sendkeys(buf, ":cn\<Tab>")
|
call term_sendkeys(buf, ":cn\<Tab>")
|
||||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_30', {})
|
call VerifyScreenDump(buf, 'Test_wildmenu_pum_30', {})
|
||||||
|
call term_sendkeys(buf, "\<Tab>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_wildmenu_pum_30', {})
|
||||||
call term_sendkeys(buf, "s")
|
call term_sendkeys(buf, "s")
|
||||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_31', {})
|
call VerifyScreenDump(buf, 'Test_wildmenu_pum_31', {})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user