]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0976: enabling the kitty keyboard protocol uses push/pop v9.0.0976
authorBram Moolenaar <Bram@vim.org>
Wed, 30 Nov 2022 10:23:17 +0000 (10:23 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 30 Nov 2022 10:23:17 +0000 (10:23 +0000)
Problem:    Enabling the kitty keyboard protocol uses push/pop.
Solution:   Use the start/stop codes to avoid unpredictable behavior.

runtime/doc/options.txt
src/term.c
src/version.c

index 83a4904c35c75f0b36c2d57cbdafd7e59e30fe45..e9404478f2af616ff179ad6fafc169b74e1adf00 100644 (file)
@@ -4901,7 +4901,7 @@ A jump table for the options with a short description can be found at |Q_op|.
                mok2    modifyOtherKeys level 2, as supported by xterm
                kitty   Kitty keyboard protocol, as supported by Kitty
 
-       The option value is a list of command separated items.  Each item has
+       The option value is a list of comma separated items.  Each item has
        a pattern that is matched against the 'term' option, a colon and the
        protocol name to be used.  To illustrate this, the default value would
        be set with: >
@@ -4926,12 +4926,13 @@ A jump table for the options with a short description can be found at |Q_op|.
                            CSI >4;m    disables modifyOtherKeys
                        The t_TI value is changed to:
                            CSI >4;2m   enables modifyOtherKeys
+                           CSI ?4m     request the modifyOtherKeys state
 
                kitty   The t_TE value is changed to:
                            CSI >4;m    disables modifyOtherKeys
-                           CSI <u      disables the kitty keyboard protocol
+                           CSI =0;1u   disables the kitty keyboard protocol
                        The t_TI value is changed to:
-                           CSI >1u     enables the kitty keyboard protocol
+                           CSI =1;1u   enables the kitty keyboard protocol
                            CSI ?u      request kitty keyboard protocol state
                            CSI >c      request the termresponse
 
index 74c4612992b35d158c9f42c9997f0168939f2842..9a45f46c39e1f8c695d7d4bdaf8a258489d08093 100644 (file)
@@ -608,11 +608,11 @@ static tcap_entry_T builtin_mok2[] = {
 static tcap_entry_T builtin_kitty[] = {
     // t_TI enables the kitty keyboard protocol, requests the kitty keyboard
     // protocol state and requests the version response.
-    {(int)KS_CTI,      "\033[>1u\033[?u\033[>c"},
+    {(int)KS_CTI,      "\033[=1;1u\033[?u\033[>c"},
 
     // t_TE also disabled modifyOtherKeys, because t_TI from xterm may already
     // have been used.
-    {(int)KS_CTE,      "\033[>4;m\033[<u"},
+    {(int)KS_CTE,      "\033[>4;m\033[=0;1u"},
 
     {(int)KS_NAME,     NULL}  // end marker
 };
index 98f1cf2d0fe24b3d890fa37ce1807998c63c3a20..37d7c8f51d8e48b284a0bb3356c8bf8cd1d74f3a 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    976,
 /**/
     975,
 /**/