if (wim_list_next || (p_wmnu && (wim_full_next
|| wim_noselect_next)))
{
- if (wim_noselect_next)
- options |= WILD_NOSELECT;
- if (wim_full_next || wim_noselect_next)
+ if (wim_full_next && !wim_noselect_next)
nextwild(xp, WILD_NEXT, options, escape);
- (void)showmatches(xp, p_wmnu, wim_list_next,
- wim_noselect_next);
+ else
+ (void)showmatches(xp, p_wmnu, wim_list_next,
+ wim_noselect_next);
if (wim_list_next)
*did_wild_list = TRUE;
}
call term_sendkeys(buf, ":cn\<Tab>")
call VerifyScreenDump(buf, 'Test_wildmenu_pum_64', {})
+ " If "longest" finds no candidate in "longest,full", "full" is used
+ call term_sendkeys(buf, "\<Esc>:set wildmode=longest,full\<CR>")
+ call term_sendkeys(buf, ":set wildoptions=pum\<CR>")
+ call term_sendkeys(buf, ":sign un\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_09', {})
+ call term_sendkeys(buf, "\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_10', {})
+
+ " Similarly for "longest,noselect:full"
+ call term_sendkeys(buf, "\<Esc>:set wildmode=longest,noselect:full\<CR>")
+ call term_sendkeys(buf, ":sign un\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_65', {})
+ call term_sendkeys(buf, "\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_09', {})
+ call term_sendkeys(buf, "\<Tab>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_10', {})
+
call term_sendkeys(buf, "\<C-U>\<Esc>")
call StopVimInTerminal(buf)
endfunc