Mercurial > vim
changeset 32574:b94e34534b57 v9.0.1619
patch 9.0.1619: the focus gained/lost escape sequences cause trouble
Commit: https://github.com/vim/vim/commit/85ef2df075a189da8b767d7554caaed8077de868
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 8 18:44:01 2023 +0100
patch 9.0.1619: the focus gained/lost escape sequences cause trouble
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 #12499)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 08 Jun 2023 19:45:03 +0200 |
parents | 71e9f8fc5d75 |
children | c03fa34ca300 |
files | src/term.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/term.c +++ b/src/term.c @@ -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]; @@ -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)