vim-patch:8.1.2385: open cmdline window with feedkeys() #11516

Problem:    Opening cmdline window with feedkeys() does not work. (Yegappan
            Lakshmanan)
Solution:   Recognize K_CMDWIN also when ex_normal_busy is set.
85db547598
This commit is contained in:
Jan Edmund Lazo
2019-12-05 02:04:19 -05:00
committed by Justin M. Keyes
parent 3aa95ef27e
commit ed424655be
2 changed files with 8 additions and 1 deletions

View File

@@ -878,7 +878,9 @@ static int command_line_execute(VimState *state, int key)
}
if (s->c == cedit_key || s->c == K_CMDWIN) {
if (ex_normal_busy == 0 && got_int == false) {
// TODO(vim): why is ex_normal_busy checked here?
if ((s->c == K_CMDWIN || ex_normal_busy == 0)
&& got_int == false) {
// Open a window to edit the command line (and history).
s->c = open_cmdwin();
s->some_key_typed = true;

View File

@@ -750,3 +750,8 @@ func Test_cmdline_overstrike()
let &encoding = encoding_save
endfunc
func Test_cmdwin_feedkeys()
" This should not generate E488
call feedkeys("q:\<CR>", 'x')
endfunc