Skip to content

Commit 51b477f

Browse files
committed
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 #7926)
1 parent 4fa1175 commit 51b477f

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/term.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,7 @@ set_termname(char_u *term)
20712071

20722072
focus_mode = TRUE;
20732073
focus_state = TRUE;
2074+
need_gather = TRUE;
20742075
}
20752076
#endif
20762077

@@ -3618,9 +3619,9 @@ starttermcap(void)
36183619
out_str(T_KS); // start "keypad transmit" mode
36193620
out_str(T_BE); // enable bracketed paste mode
36203621

3621-
#if (defined(UNIX) || defined(VMS))
3622-
// enable xterm's focus reporting mode
3623-
if (focus_mode && *T_FE != NUL)
3622+
#if defined(UNIX) || defined(VMS)
3623+
// Enable xterm's focus reporting mode when 'esckeys' is set.
3624+
if (focus_mode && p_ek && *T_FE != NUL)
36243625
out_str(T_FE);
36253626
#endif
36263627

@@ -3676,9 +3677,9 @@ stoptermcap(void)
36763677
ch_log_output = TRUE;
36773678
#endif
36783679

3679-
#if (defined(UNIX) || defined(VMS))
3680-
// disable xterm's focus reporting mode
3681-
if (focus_mode && *T_FD != NUL)
3680+
#if defined(UNIX) || defined(VMS)
3681+
// Disable xterm's focus reporting mode if 'esckeys' is set.
3682+
if (focus_mode && p_ek && *T_FD != NUL)
36823683
out_str(T_FD);
36833684
#endif
36843685

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2564,
753755
/**/
754756
2563,
755757
/**/

0 commit comments

Comments
 (0)