TUI: urxvt: also send xterm focus-reporting seqs #8699

urxvt supports the xterm sequence for focus reporting in master / CVS
since 2016 [1].

This has not been released yet, but is expected to be in 9.23.

In 3d0ee17 a special case for rxvt was added, which requires a custom
urxvt extension, see #7578.

Since urxvt 9.23 is not released still, and extensions for handling this
manually appear to be in use, this sends both escape sequences for rxvt.

Fixes https://github.com/neovim/neovim/issues/8695.

1: 75264fa544 (diff-2c8f5590ce4fa7495edcf7572c89c77b)
This commit is contained in:
Daniel Hahler 2018-07-08 17:27:09 +02:00 committed by Justin M. Keyes
parent 57fafcea23
commit 07f82ad1be

View File

@ -1722,30 +1722,25 @@ static void augment_terminfo(TUIData *data, const char *term,
/// Terminals usually ignore unrecognized private modes, and there is no
/// known ambiguity with these. So we just set them unconditionally.
data->unibi_ext.enable_lr_margin = (int)unibi_add_ext_str(ut,
"ext.enable_lr_margin",
"\x1b[?69h");
data->unibi_ext.disable_lr_margin = (int)unibi_add_ext_str(ut,
"ext.disable_lr_margin",
"\x1b[?69l");
data->unibi_ext.enable_bracketed_paste = (int)unibi_add_ext_str(ut,
"ext.enable_bpaste",
"\x1b[?2004h");
data->unibi_ext.disable_bracketed_paste = (int)unibi_add_ext_str(ut,
"ext.disable_bpaste",
"\x1b[?2004l");
data->unibi_ext.enable_focus_reporting = (int)unibi_add_ext_str(ut,
"ext.enable_focus",
rxvt ? "\x1b]777;focus;on\x7" : "\x1b[?1004h");
data->unibi_ext.disable_focus_reporting = (int)unibi_add_ext_str(ut,
"ext.disable_focus",
rxvt ? "\x1b]777;focus;off\x7" : "\x1b[?1004l");
data->unibi_ext.enable_mouse = (int)unibi_add_ext_str(ut,
"ext.enable_mouse",
"\x1b[?1002h\x1b[?1006h");
data->unibi_ext.disable_mouse = (int)unibi_add_ext_str(ut,
"ext.disable_mouse",
"\x1b[?1002l\x1b[?1006l");
data->unibi_ext.enable_lr_margin = (int)unibi_add_ext_str(
ut, "ext.enable_lr_margin", "\x1b[?69h");
data->unibi_ext.disable_lr_margin = (int)unibi_add_ext_str(
ut, "ext.disable_lr_margin", "\x1b[?69l");
data->unibi_ext.enable_bracketed_paste = (int)unibi_add_ext_str(
ut, "ext.enable_bpaste", "\x1b[?2004h");
data->unibi_ext.disable_bracketed_paste = (int)unibi_add_ext_str(
ut, "ext.disable_bpaste", "\x1b[?2004l");
// For urxvt send BOTH xterm and old urxvt sequences. #8695
data->unibi_ext.enable_focus_reporting = (int)unibi_add_ext_str(
ut, "ext.enable_focus",
rxvt ? "\x1b[?1004h\x1b]777;focus;on\x7" : "\x1b[?1004h");
data->unibi_ext.disable_focus_reporting = (int)unibi_add_ext_str(
ut, "ext.disable_focus",
rxvt ? "\x1b[?1004l\x1b]777;focus;off\x7" : "\x1b[?1004l");
data->unibi_ext.enable_mouse = (int)unibi_add_ext_str(
ut, "ext.enable_mouse", "\x1b[?1002h\x1b[?1006h");
data->unibi_ext.disable_mouse = (int)unibi_add_ext_str(
ut, "ext.disable_mouse", "\x1b[?1002l\x1b[?1006l");
}
static void flush_buf(UI *ui)