mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 9.0.0980: the keyboard state response may end up in a shell command
Problem: The keyboard state response may end up in a shell command. Solution: Only request the keyboard protocol state when the typeahead is empty, no more commands are following and not exiting. Add the t_RK termcap entry for this.
This commit is contained in:
11
src/edit.c
11
src/edit.c
@@ -571,6 +571,8 @@ edit(
|
||||
#ifdef USE_ON_FLY_SCROLL
|
||||
dont_scroll = FALSE; // allow scrolling here
|
||||
#endif
|
||||
// May request the keyboard protocol state now.
|
||||
may_send_t_RK();
|
||||
|
||||
/*
|
||||
* Get a character for Insert mode. Ignore K_IGNORE and K_NOP.
|
||||
@@ -1479,7 +1481,8 @@ ins_redraw(int ready) // not busy with something
|
||||
aco_save_T aco;
|
||||
varnumber_T tick = CHANGEDTICK(curbuf);
|
||||
|
||||
// save and restore curwin and curbuf, in case the autocmd changes them
|
||||
// Save and restore curwin and curbuf, in case the autocmd changes
|
||||
// them.
|
||||
aucmd_prepbuf(&aco, curbuf);
|
||||
apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
|
||||
aucmd_restbuf(&aco);
|
||||
@@ -1499,7 +1502,8 @@ ins_redraw(int ready) // not busy with something
|
||||
aco_save_T aco;
|
||||
varnumber_T tick = CHANGEDTICK(curbuf);
|
||||
|
||||
// save and restore curwin and curbuf, in case the autocmd changes them
|
||||
// Save and restore curwin and curbuf, in case the autocmd changes
|
||||
// them.
|
||||
aucmd_prepbuf(&aco, curbuf);
|
||||
apply_autocmds(EVENT_TEXTCHANGEDP, NULL, NULL, FALSE, curbuf);
|
||||
aucmd_restbuf(&aco);
|
||||
@@ -3706,7 +3710,7 @@ ins_esc(
|
||||
out_str(T_BE);
|
||||
|
||||
// Re-enable modifyOtherKeys.
|
||||
out_str(T_CTI);
|
||||
out_str_t_TI();
|
||||
}
|
||||
#ifdef FEAT_CONCEAL
|
||||
// Check if the cursor line needs redrawing after changing State. If
|
||||
@@ -4384,6 +4388,7 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
||||
do
|
||||
c = vgetc();
|
||||
while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
|
||||
|
||||
if (c == NUL || got_int || (ex_normal_busy > 0 && c == Ctrl_C))
|
||||
// When CTRL-C was encountered the typeahead will be flushed and we
|
||||
// won't get the end sequence. Except when using ":normal".
|
||||
|
Reference in New Issue
Block a user