Browse files

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 #8695.

1: exg/rxvt-unicode@75264fa#diff-2c8f5590ce4fa7495edcf7572c89c77b
  • Loading branch information...
blueyed authored and justinmk committed Jul 8, 2018
1 parent 57fafce commit 07f82ad1be4fc8c7722e07241492c68abab8ff92
Showing with 19 additions and 24 deletions.
  1. +19 −24 src/nvim/tui/tui.c
@@ -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,
data->unibi_ext.disable_lr_margin = (int)unibi_add_ext_str(ut,
data->unibi_ext.enable_bracketed_paste = (int)unibi_add_ext_str(ut,
data->unibi_ext.disable_bracketed_paste = (int)unibi_add_ext_str(ut,
data->unibi_ext.enable_focus_reporting = (int)unibi_add_ext_str(ut,
rxvt ? "\x1b]777;focus;on\x7" : "\x1b[?1004h");
data->unibi_ext.disable_focus_reporting = (int)unibi_add_ext_str(ut,
rxvt ? "\x1b]777;focus;off\x7" : "\x1b[?1004l");
data->unibi_ext.enable_mouse = (int)unibi_add_ext_str(ut,
data->unibi_ext.disable_mouse = (int)unibi_add_ext_str(ut,
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)

0 comments on commit 07f82ad

Please sign in to comment.