]> granicus.if.org Git - vim/commitdiff
patch 8.2.2358: wrong #ifdef for use_xterm_like_mouse() v8.2.2358
authorBram Moolenaar <Bram@vim.org>
Sat, 16 Jan 2021 10:21:40 +0000 (11:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 16 Jan 2021 10:21:40 +0000 (11:21 +0100)
Problem:    Wrong #ifdef for use_xterm_like_mouse().
Solution:   Use FEAT_MOUSE_XTERM.

src/term.c
src/version.c

index b17bc397e3615ce397d984fd21e4f396af8f37f4..5d1228dd7d2ff7f4e3646a492ff71f1d03f31f74 100644 (file)
@@ -2053,20 +2053,20 @@ set_termname(char_u *term)
     set_mouse_termcode(KS_MOUSE, (char_u *)"\233M");
 #endif
 
-#if (defined(UNIX) || defined(VMS))
+#ifdef FEAT_MOUSE_XTERM
     // focus reporting is supported by xterm compatible terminals and tmux.
     if (use_xterm_like_mouse(term))
     {
        char_u name[3];
-       name[0] = (int)KS_EXTRA;
-       name[2] = NUL;
 
        // handle focus in event
-       name[1] = (int)KE_FOCUSGAINED;
+       name[0] = KS_EXTRA;
+       name[1] = KE_FOCUSGAINED;
+       name[2] = NUL;
        add_termcode(name, (char_u *)"\033[I", FALSE);
 
        // handle focus out event
-       name[1] = (int)KE_FOCUSLOST;
+       name[1] = KE_FOCUSLOST;
        add_termcode(name, (char_u *)"\033[O", FALSE);
 
        focus_mode = TRUE;
index e7417402fbcb89d30f6b59f5f1a5a3834c7df963..3603bf4b6ffa85da73a2319e2f88bd20c6e44245 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2358,
 /**/
     2357,
 /**/