]> granicus.if.org Git - vim/commitdiff
patch 8.0.0993: sometimes an xterm sends an extra CTRL-X v8.0.0993
authorBram Moolenaar <Bram@vim.org>
Thu, 24 Aug 2017 18:21:16 +0000 (20:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 24 Aug 2017 18:21:16 +0000 (20:21 +0200)
Problem:    Sometimes an xterm sends an extra CTRL-X after the response for
            the background color.  Related to t_RS.
Solution:   Check for the CTRL-X after the terminating 0x7.

src/term.c
src/version.c

index 6de45224c3782f8f937fb1c6f1b9b18b99bcab17..9e8bc3bbaffdcb11d2c9e2934db9872891c6b36b 100644 (file)
@@ -4626,6 +4626,10 @@ check_termcode(
                        key_name[0] = (int)KS_EXTRA;
                        key_name[1] = (int)KE_IGNORE;
                        slen = i + 1 + (tp[i] == ESC);
+                       if (tp[i] == 0x07 && i + 1 < len && tp[i + 1] == 0x18)
+                           /* Sometimes the 0x07 is followed by 0x18, unclear
+                            * when this happens. */
+                           ++slen;
                        break;
                    }
                if (i == len)
index 1006ca0f042f042b289e236ca3ce51528596d2cf..e54b7bc4dade4f973c6419277c8534f4dbd4bc66 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    993,
 /**/
     992,
 /**/