From b81c310d49f77c8f92ba2fdd99c7e0e9cb49d498 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Thu, 24 Mar 2022 13:11:04 -0600 Subject: [PATCH] fix(tui): correct CSI sequence (#17844) Follow up to #17771. The sequence `CSI > 4 ; 1 m` does not enable distinguishing all available keys; notably, it excludes ``. Using `CSI > 4 ; 2 m` tells the terminal to disambiguate *all* keys, which is much more useful. The meaning of the final parameter is documented [here][1]. [1]: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys --- src/nvim/tui/tui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index bec55174c4..d27a13c583 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -2077,7 +2077,7 @@ static void augment_terminfo(TUIData *data, const char *term, long vte_version, // Kitty does not support these sequences; it only supports it's own CSI > 1 u which enables the // Kitty keyboard protocol data->unibi_ext.enable_extended_keys = (int)unibi_add_ext_str(ut, "ext.enable_extended_keys", - "\x1b[>4;1m"); + "\x1b[>4;2m"); data->unibi_ext.disable_extended_keys = (int)unibi_add_ext_str(ut, "ext.disable_extended_keys", "\x1b[>4;0m"); }