0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 9.0.1063: when using Kitty a shell command may mess up the key state

Problem:    When using Kitty a shell command may mess up the key protocol
            state.
Solution:   Output t_te before t_TE.  If t_te switches between the main and
            the alternate screen then deactivating the key protocol by t_TE
            should happen after switching screen. (issue #11705)
This commit is contained in:
Bram Moolenaar 2022-12-16 13:08:36 +00:00
parent 4cd45f1408
commit 4ab1f4a32f
2 changed files with 6 additions and 1 deletions

View File

@ -3891,10 +3891,13 @@ stoptermcap(void)
out_str(T_KE); // stop "keypad transmit" mode out_str(T_KE); // stop "keypad transmit" mode
out_flush(); out_flush();
termcap_active = FALSE; termcap_active = FALSE;
// Output t_te first, it may switch between main and alternate screen,
// and following codes may work on the active screen only.
out_str(T_TE); // stop termcap mode
cursor_on(); // just in case it is still off cursor_on(); // just in case it is still off
out_str_t_TE(); // stop "raw" mode, modifyOtherKeys and out_str_t_TE(); // stop "raw" mode, modifyOtherKeys and
// Kitty keyboard protocol // Kitty keyboard protocol
out_str(T_TE); // stop termcap mode
screen_start(); // don't know where cursor is now screen_start(); // don't know where cursor is now
out_flush(); out_flush();
} }

View File

@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1063,
/**/ /**/
1062, 1062,
/**/ /**/