mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
tui: Also use xterm-256color when TERM=screen and COLORTERM != NULL
When COLORTERM != null force xterm-256color capabilities when TERM equals xterm or screen.
This commit is contained in:
parent
0ed3d66bef
commit
97f8251472
@ -722,9 +722,10 @@ static void fix_terminfo(TUIData *data)
|
||||
#define XTERM_SETAB \
|
||||
"\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m"
|
||||
|
||||
if (!strcmp(term, "xterm") && os_getenv("COLORTERM") != NULL) {
|
||||
if (os_getenv("COLORTERM") != NULL
|
||||
&& (!strcmp(term, "xterm") || !strcmp(term, "screen"))) {
|
||||
// probably every modern terminal that sets TERM=xterm supports 256
|
||||
// colors(eg: gnome-terminal).
|
||||
// colors(eg: gnome-terminal). Also do it when TERM=screen.
|
||||
unibi_set_num(ut, unibi_max_colors, 256);
|
||||
unibi_set_str(ut, unibi_set_a_foreground, XTERM_SETAF);
|
||||
unibi_set_str(ut, unibi_set_a_background, XTERM_SETAB);
|
||||
|
Loading…
Reference in New Issue
Block a user