changeset 23632:8da1d91d751c v8.2.2358

patch 8.2.2358: wrong #ifdef for use_xterm_like_mouse() Commit: https://github.com/vim/vim/commit/bf78974ca4a6798db7172c226cbfe7b2485b7baa Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 16 11:21:40 2021 +0100 patch 8.2.2358: wrong #ifdef for use_xterm_like_mouse() Problem: Wrong #ifdef for use_xterm_like_mouse(). Solution: Use FEAT_MOUSE_XTERM.
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Jan 2021 11:30:05 +0100
parents 552142f8e219
children 7d23529a011d
files src/term.c src/version.c
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -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;
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2358,
+/**/
     2357,
 /**/
     2356,