diff options
author | Daniel Hahler <git@thequod.de> | 2015-08-13 03:29:02 +0200 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2016-01-29 23:22:56 +0100 |
commit | 0e546d8b384098d704c13401731a93b926bcd22f (patch) | |
tree | 526ae88ba0dd86900d043d54218b3ffaf02e986d /src | |
parent | 4c960c3d78d9aaae77c469c91c88280c9f5efbf2 (diff) | |
download | rneovim-0e546d8b384098d704c13401731a93b926bcd22f.tar.gz rneovim-0e546d8b384098d704c13401731a93b926bcd22f.tar.bz2 rneovim-0e546d8b384098d704c13401731a93b926bcd22f.zip |
Do not use TMUX_WRAP for DECSCUSR sequence
Wrapping it will send it to the terminal "directly", which might change the
cursor of another pane, e.g. when starting Neovim and changing to
another pane directly.
tmux has a terminfo extension (Ss/Se) to handle and translate the
DECSCUSR sequences internally. This can be controlled through
`terminal-overrides`, but does not appear to be able to handle the
uncommon sequences for Konsole.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/tui/tui.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 7f7d138358..00e2821075 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -845,7 +845,7 @@ static void fix_terminfo(TUIData *data) if ((term_prog && !strcmp(term_prog, "Konsole")) || os_getenv("KONSOLE_DBUS_SESSION") != NULL) { // Konsole uses a proprietary escape code to set the cursor shape - // and does not suppport DECSCUSR. + // and does not support DECSCUSR. data->unibi_ext.enter_insert_mode = (int)unibi_add_ext_str(ut, NULL, TMUX_WRAP("\x1b]50;CursorShape=1;BlinkingCursorEnabled=1\x07")); data->unibi_ext.enter_replace_mode = (int)unibi_add_ext_str(ut, NULL, @@ -854,13 +854,15 @@ static void fix_terminfo(TUIData *data) TMUX_WRAP("\x1b]50;CursorShape=0;BlinkingCursorEnabled=0\x07")); } else if (!vte_version || atoi(vte_version) >= 3900) { // Assume that the terminal supports DECSCUSR unless it is an - // old VTE based terminal + // old VTE based terminal. This should not get wrapped for tmux, + // which will handle it via its Ss/Se terminfo extension - usually + // according to its terminal-overrides. data->unibi_ext.enter_insert_mode = (int)unibi_add_ext_str(ut, NULL, - TMUX_WRAP("\x1b[5 q")); + "\x1b[5 q"); data->unibi_ext.enter_replace_mode = (int)unibi_add_ext_str(ut, NULL, - TMUX_WRAP("\x1b[3 q")); + "\x1b[3 q"); data->unibi_ext.exit_insert_mode = (int)unibi_add_ext_str(ut, NULL, - TMUX_WRAP("\x1b[2 q")); + "\x1b[2 q"); } end: |