tui: Add tmux to the always 256-colour capable list.

This commit is contained in:
Jonathan de Boyne Pollard
2017-06-03 15:03:03 +01:00
parent b604e3a086
commit f6116eeaa3

View File

@@ -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"))
) {