diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-30 23:50:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-30 23:50:46 +0200 |
commit | 13e8356f52d9dc1da96179ee425168740874c8c7 (patch) | |
tree | 502c685f85569b41890f9266d39c799f1bba63b7 /src | |
parent | 0795dd3c9031a7151f41838fb8a9970d60e7d864 (diff) | |
parent | 360ca18f550118b10ebde31dc56c65c0cd5d155a (diff) | |
download | rneovim-13e8356f52d9dc1da96179ee425168740874c8c7.tar.gz rneovim-13e8356f52d9dc1da96179ee425168740874c8c7.tar.bz2 rneovim-13e8356f52d9dc1da96179ee425168740874c8c7.zip |
Merge #7100 from justinmk/tui-colors
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/tui/tui.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 0975b87ea3..c29ec09638 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1537,11 +1537,11 @@ static void augment_terminfo(TUIData *data, const char *term, bool teraterm = terminfo_is_term_family(term, "teraterm"); bool putty = terminfo_is_term_family(term, "putty"); bool screen = terminfo_is_term_family(term, "screen"); + bool tmux = terminfo_is_term_family(term, "tmux") || !!os_getenv("TMUX"); bool iterm = terminfo_is_term_family(term, "iterm") || terminfo_is_term_family(term, "iTerm.app"); // None of the following work over SSH; see :help TERM . bool iterm_pretending_xterm = xterm && iterm_env; - bool tmux_wrap = screen && !!os_getenv("TMUX"); const char * xterm_version = os_getenv("XTERM_VERSION"); bool true_xterm = xterm && !!xterm_version; @@ -1573,12 +1573,11 @@ static void augment_terminfo(TUIData *data, const char *term, // specific ones. // can use colons like ISO 8613-6:1994/ITU T.416:1993 says. - bool has_colon_rgb = false - // per GNOME bug #685759 and bug #704449 - || (vte_version >= 3600) - || iterm || iterm_pretending_xterm // per analysis of VT100Terminal.m - // per http://invisible-island.net/xterm/xterm.log.html#xterm_282 - || true_xterm; + bool has_colon_rgb = !tmux && !screen + && ((vte_version >= 3600) // per GNOME bug #685759, #704449 + || iterm || iterm_pretending_xterm // per analysis of VT100Terminal.m + // per http://invisible-island.net/xterm/xterm.log.html#xterm_282 + || true_xterm); data->unibi_ext.set_rgb_foreground = unibi_find_ext_str(ut, "setrgbf"); if (-1 == data->unibi_ext.set_rgb_foreground) { @@ -1606,7 +1605,7 @@ static void augment_terminfo(TUIData *data, const char *term, // all panes, which is not particularly desirable. A better approach // 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_wrap, "\033]Pl%p1%06x\033\\")); + 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 |