diff options
author | Sam Wilson <tecywiz121@hotmail.com> | 2018-11-02 16:36:00 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-11-03 21:39:48 +0100 |
commit | 67f80d485cecc1158d9d3833cbf1cf67f3a324bb (patch) | |
tree | 85becdd070bf0cc75d1e2ddcabfbe214cd4e06d3 | |
parent | a6661178aa5dc2f1687131685423cb72f28e141a (diff) | |
download | rneovim-67f80d485cecc1158d9d3833cbf1cf67f3a324bb.tar.gz rneovim-67f80d485cecc1158d9d3833cbf1cf67f3a324bb.tar.bz2 rneovim-67f80d485cecc1158d9d3833cbf1cf67f3a324bb.zip |
TUI: Avoid reset_cursor_color in old VTE #9191
closes #9089
-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 9c9b9d4a7b..fc7d31edb0 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1814,14 +1814,16 @@ static void augment_terminfo(TUIData *data, const char *term, // would use a tmux control sequence and an extra if(screen) test. data->unibi_ext.set_cursor_color = (int)unibi_add_ext_str( ut, NULL, TMUX_WRAP(tmux, "\033]Pl%p1%06x\033\\")); - } else if (xterm || (vte_version != 0) || rxvt) { - // This seems to be supported for a long time in VTE - // urxvt also supports this + } else if ((xterm || rxvt) && (vte_version == 0 || vte_version >= 3900)) { + // Supported in urxvt, newer VTE. data->unibi_ext.set_cursor_color = (int)unibi_add_ext_str( ut, "ext.set_cursor_color", "\033]12;#%p1%06x\007"); } - data->unibi_ext.reset_cursor_color = (int)unibi_add_ext_str( - ut, "ext.reset_cursor_color", "\x1b]112\x07"); + + if (-1 != data->unibi_ext.set_cursor_color) { + data->unibi_ext.reset_cursor_color = (int)unibi_add_ext_str( + ut, "ext.reset_cursor_color", "\x1b]112\x07"); + } /// Terminals usually ignore unrecognized private modes, and there is no /// known ambiguity with these. So we just set them unconditionally. |