]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1619: the focus gained/lost escape sequences cause trouble v9.0.1619
authorBram Moolenaar <Bram@vim.org>
Thu, 8 Jun 2023 17:44:01 +0000 (18:44 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 8 Jun 2023 17:44:01 +0000 (18:44 +0100)
Problem:    The focus gained/lost escape sequences cause trouble for a
            terminal where Vim does not expect them.
Solution:   Always recognize the codes for focus gained/lost. (closes #12499)

src/term.c
src/version.c

index 2f0a0cb4d71ff8994225d93c577cd1931db6310f..0416acc7057021ceb2820aab9a800e9e68220ee6 100644 (file)
@@ -2221,7 +2221,9 @@ set_termname(char_u *term)
     // We hard-code the received escape sequences here.  There are the terminfo
     // entries kxIN and kxOUT, but they are rarely used and do hot have a
     // two-letter termcap name.
-    if (use_xterm_like_mouse(term))
+    // This used to be done only for xterm-like terminals, but some others also
+    // may produce these codes.  Always recognize them, as the chance of them
+    // being used for something else is very small.
     {
        char_u name[3];
 
@@ -6447,7 +6449,7 @@ check_termcode(
 # endif // !USE_ON_FLY_SCROLL
 #endif // FEAT_GUI
 
-#if (defined(UNIX) || defined(VMS))
+#if defined(UNIX) || defined(VMS)
        /*
         * Handle FocusIn/FocusOut event sequences reported by XTerm.
         * (CSI I/CSI O)
index 13888eb32046f3f2e5a500867a05d7880c05df5c..90331ed8e2a437054288910c29affd6213b903f9 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1619,
 /**/
     1618,
 /**/