From 97f82514721fee8b349c2d342813ea36097522c1 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sat, 21 Feb 2015 22:22:09 -0300 Subject: tui: Also use xterm-256color when TERM=screen and COLORTERM != NULL When COLORTERM != null force xterm-256color capabilities when TERM equals xterm or screen. --- src/nvim/tui/tui.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 0d366c2325..cdea8673c7 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -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); -- cgit