mirror of
https://github.com/neovim/neovim.git
synced 2026-04-29 10:44:08 +00:00
tui: Add tmux to the always 256-colour capable list.
This commit is contained in:
@@ -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"))
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user