{
static int entered = FALSE;
int saved_did_emsg = did_emsg;
+ int saved_KeyTyped = KeyTyped;
// When called recursively return. This can happen when the statusline
// contains an expression that triggers a redraw.
}
did_emsg |= saved_did_emsg;
entered = FALSE;
+
+ // A user function may reset KeyTyped, restore it.
+ KeyTyped = saved_KeyTyped;
}
#endif
return repeat(['aaaa'], 120)
endfunc
command -nargs=* -complete=customlist,CmdCompl Tcmd
+
+ func MyStatusLine() abort
+ return 'status'
+ endfunc
+ func SetupStatusline()
+ set statusline=%!MyStatusLine()
+ set laststatus=2
+ endfunc
[CODE]
call writefile(commands, 'Xtest')
call term_sendkeys(buf, ":ls\<CR>")
call term_sendkeys(buf, ":com\<Tab> ")
call VerifyScreenDump(buf, 'Test_wildmenu_pum_38', {})
+ call term_sendkeys(buf, "\<C-U>\<CR>")
+
+ " Esc still works to abort the command when 'statusline' is set
+ call term_sendkeys(buf, ":call SetupStatusline()\<CR>")
+ call term_sendkeys(buf, ":si\<Tab>")
+ call term_sendkeys(buf, "\<Esc>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_39', {})
call term_sendkeys(buf, "\<C-U>\<CR>")
call StopVimInTerminal(buf)