if (cmdline_pum_active())
{
skip_pum_redraw = skip_pum_redraw && !key_is_wc
+ && !VIM_ISWHITE(c)
&& (vim_isprintc(c)
|| c == K_BS || c == Ctrl_H || c == K_DEL
|| c == K_KDEL || c == Ctrl_W || c == Ctrl_U);
MB_PTR_ADV(s);
}
}
- msg_hist_off = TRUE;
- vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead,
- s > compl_shown_match->cp_fname ? "<" : "", s);
- msg((char *)IObuff);
- msg_hist_off = FALSE;
- redraw_cmdline = FALSE; // don't overwrite!
+ if (!compl_autocomplete)
+ {
+ msg_hist_off = TRUE;
+ vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead,
+ s > compl_shown_match->cp_fname ? "<" : "", s);
+ msg((char *)IObuff);
+ msg_hist_off = FALSE;
+ redraw_cmdline = FALSE; // don't overwrite!
+ }
}
/*
--- /dev/null
+| +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|:+0#0000000&|t|e|r|m| |f|o@1> @65
cunmap <Down>
endfunc
+" Issue 18298: wildmenu should be dismissed after wildtrigger and whitespace
+func Test_update_screen_after_wildtrigger()
+ CheckScreendump
+ let lines =<< trim [SCRIPT]
+ call test_override("char_avail", 1)
+ set wildmode=noselect:lastused,full wildmenu wildoptions=pum
+ autocmd CmdlineChanged : if getcmdcompltype() != 'shellcmd' | call wildtrigger() | endif
+ [SCRIPT]
+ call writefile(lines, 'XTest_wildtrigger', 'D')
+ let buf = RunVimInTerminal('-S XTest_wildtrigger', {'rows': 10})
+
+ call term_sendkeys(buf, ":term foo")
+ call TermWait(buf, 50)
+ call VerifyScreenDump(buf, 'Test_update_screen_wildtrigger_1', {})
+
+ call term_sendkeys(buf, "\<esc>")
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
call feedkeys("Sazx\<Left>\<BS>\<F2>\<Esc>0", 'tx!')
call assert_equal(['and', 'afoo'], b:matches->mapnew('v:val.word'))
- " Test 6: <BS> should clear the selected item
+ " Test 6: <BS> should clear the selected item (PR #18265)
%d
call setline(1, ["foobarfoo", "foobar", "foobarbaz"])
call feedkeys("Gofo\<C-N>\<C-N>\<F2>\<F3>\<Esc>0", 'tx!')
call assert_equal(0, b:selected)
call assert_equal('foobarbaz', getline(4))
+ " Test 7: Remove selection when menu contents change (PR #18265)
+ %d
+ call setline(1, ["foobar", "fodxyz", "fodabc"])
+ call feedkeys("Gofoo\<C-N>\<BS>\<BS>\<BS>\<BS>d\<F2>\<F3>\<Esc>0", 'tx!')
+ call assert_equal(['fodabc', 'fodxyz'], b:matches->mapnew('v:val.word'))
+ call assert_equal(-1, b:selected)
+
bw!
call test_override("char_avail", 0)
delfunc NonKeywordComplete
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1771,
/**/
1770,
/**/