summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-16 13:08:36 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-16 13:08:36 +0000
commit4ab1f4a32f7e0fcafa8f542429f1f6c47dcd5d2c (patch)
treebb346b3347e23ef3b607423d2866bfa1d4edab2e
parent4cd45f1408321905019614b40a2173fe0456a96d (diff)
downloadvim-git-4ab1f4a32f7e0fcafa8f542429f1f6c47dcd5d2c.tar.gz
patch 9.0.1063: when using Kitty a shell command may mess up the key statev9.0.1063
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)
-rw-r--r--src/term.c5
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c
index 13e3709fb..777c510e8 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3891,10 +3891,13 @@ stoptermcap(void)
out_str(T_KE); // stop "keypad transmit" mode
out_flush();
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
out_str_t_TE(); // stop "raw" mode, modifyOtherKeys and
// Kitty keyboard protocol
- out_str(T_TE); // stop termcap mode
screen_start(); // don't know where cursor is now
out_flush();
}
diff --git a/src/version.c b/src/version.c
index 097c0a6a2..316d21313 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1063,
+/**/
1062,
/**/
1061,