From f6116eeaa389e6c6af8091cfdf9cb1a5acfd7f00 Mon Sep 17 00:00:00 2001 From: Jonathan de Boyne Pollard Date: Sat, 3 Jun 2017 15:03:03 +0100 Subject: tui: Add tmux to the always 256-colour capable list. --- src/nvim/tui/tui.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index ca8270ac22..ba9356b7ca 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1223,6 +1223,7 @@ static void patch_terminfo_bugs(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"); bool st = terminfo_is_term_family(term, "st"); bool gnome = terminfo_is_term_family(term, "gnome") || terminfo_is_term_family(term, "vte"); @@ -1236,6 +1237,7 @@ static void patch_terminfo_bugs(TUIData *data, const char *term, bool mate_pretending_xterm = xterm && colorterm && strstr(colorterm, "mate-terminal"); bool true_xterm = xterm && !!xterm_version; + bool tmux_pretending_screen = screen && !!os_getenv("TMUX"); char *fix_normal = (char *)unibi_get_str(ut, unibi_cursor_normal); if (fix_normal) { @@ -1355,6 +1357,7 @@ static void patch_terminfo_bugs(TUIData *data, const char *term, } else if (konsole || xterm || gnome || rxvt || st || putty || linuxvt // Linux 4.8+ supports 256-colour SGR. || mate_pretending_xterm || gnome_pretending_xterm + || tmux || tmux_pretending_screen || (colorterm && strstr(colorterm, "256")) || (term && strstr(term, "256")) ) { -- cgit