changeset 24045:1b56d4c75d19 v8.2.2564

patch 8.2.2564: focus events end Insert mode if 'esckeys' is not set Commit: https://github.com/vim/vim/commit/51b477f74f0de11f6f92a65590f358e04a60a099 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 3 15:24:28 2021 +0100 patch 8.2.2564: focus events end Insert mode if 'esckeys' is not set Problem: Focus events end Insert mode if 'esckeys' is not set. Solution: Do not enable focus events when 'esckeys' is off. (closes https://github.com/vim/vim/issues/7926)
author Bram Moolenaar <Bram@vim.org>
date Wed, 03 Mar 2021 15:30:03 +0100
parents fa681d4682be
children 353c5b0f1f9f
files src/term.c src/version.c
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -2071,6 +2071,7 @@ set_termname(char_u *term)
 
 	focus_mode = TRUE;
 	focus_state = TRUE;
+	need_gather = TRUE;
     }
 #endif
 
@@ -3618,9 +3619,9 @@ starttermcap(void)
 	out_str(T_KS);			// start "keypad transmit" mode
 	out_str(T_BE);			// enable bracketed paste mode
 
-#if (defined(UNIX) || defined(VMS))
-	// enable xterm's focus reporting mode
-	if (focus_mode && *T_FE != NUL)
+#if defined(UNIX) || defined(VMS)
+	// Enable xterm's focus reporting mode when 'esckeys' is set.
+	if (focus_mode && p_ek && *T_FE != NUL)
 	    out_str(T_FE);
 #endif
 
@@ -3676,9 +3677,9 @@ stoptermcap(void)
 	ch_log_output = TRUE;
 #endif
 
-#if (defined(UNIX) || defined(VMS))
-	// disable xterm's focus reporting mode
-	if (focus_mode && *T_FD != NUL)
+#if defined(UNIX) || defined(VMS)
+	// Disable xterm's focus reporting mode if 'esckeys' is set.
+	if (focus_mode && p_ek && *T_FD != NUL)
 	    out_str(T_FD);
 #endif
 
--- 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 */
 /**/
+    2564,
+/**/
     2563,
 /**/
     2562,