Skip to content

Commit

Permalink
patch 9.0.1619: the focus gained/lost escape sequences cause trouble
Browse files Browse the repository at this point in the history
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 vim#12499)
  • Loading branch information
brammool committed Jun 8, 2023
1 parent 7fbcee6 commit 85ef2df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1619,
/**/
1618,
/**/
Expand Down

0 comments on commit 85ef2df

Please sign in to comment.