{
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
int use_sandbox = FALSE;
win_T *ewp;
int p_crb_save;
+ int save_KeyTyped = KeyTyped;
// There is a tiny chance that this gets called recursively: When
// redrawing a status line triggers redrawing the ruler or tabline.
theend:
entered = FALSE;
+
+ // A user function may reset KeyTyped, restore it.
+ KeyTyped = save_KeyTyped;
}
#endif // FEAT_STL_OPT
set statusline=%!MyStatusLine()
set laststatus=2
endfunc
+
+ func MyTabLine()
+ return 'my tab line'
+ endfunc
+ func SetupTabline()
+ set statusline=
+ set tabline=%!MyTabLine()
+ set showtabline=2
+ endfunc
[CODE]
call writefile(commands, 'Xtest')
call term_sendkeys(buf, "\<Esc>")
call VerifyScreenDump(buf, 'Test_wildmenu_pum_39', {})
+ " Esc still works to abort the command when 'tabline' is set
+ call term_sendkeys(buf, ":call SetupTabline()\<CR>")
+ call term_sendkeys(buf, ":si\<Tab>")
+ call term_sendkeys(buf, "\<Esc>")
+ call VerifyScreenDump(buf, 'Test_wildmenu_pum_40', {})
+
call term_sendkeys(buf, "\<C-U>\<CR>")
call StopVimInTerminal(buf)
call delete('Xtest')