From 5da4a4fe8911837c7ddbf45fc36a92c47446e0d2 Mon Sep 17 00:00:00 2001 From: Valentin Batz Date: Tue, 31 Jan 2006 19:06:20 +0000 Subject: Fix colors with TERM=xterm-{88,256}color, patch by Emanuele Giaquinta git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4231 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/terminfo-core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/fe-text/terminfo-core.c b/src/fe-text/terminfo-core.c index ebaf4171..530050c2 100644 --- a/src/fe-text/terminfo-core.c +++ b/src/fe-text/terminfo-core.c @@ -416,23 +416,23 @@ void terminfo_setup_colors(TERM_REC *term, int force) terminfo_colors_deinit(term); term->has_colors = term->TI_setf || term->TI_setaf; - if (term->TI_setf) { - for (i = 0; i < 8; i++) - term->TI_fg[i] = g_strdup(tparm(term->TI_setf, i, 0)); - } else if (term->TI_setaf) { + if (term->TI_setaf) { for (i = 0; i < 8; i++) term->TI_fg[i] = g_strdup(tparm(term->TI_setaf, ansitab[i], 0)); + } else if (term->TI_setf) { + for (i = 0; i < 8; i++) + term->TI_fg[i] = g_strdup(tparm(term->TI_setf, i, 0)); } else if (force) { for (i = 0; i < 8; i++) term->TI_fg[i] = g_strdup_printf("\033[%dm", 30+ansitab[i]); } - if (term->TI_setb) { - for (i = 0; i < 8; i++) - term->TI_bg[i] = g_strdup(tparm(term->TI_setb, i, 0)); - } else if (term->TI_setab) { + if (term->TI_setab) { for (i = 0; i < 8; i++) term->TI_bg[i] = g_strdup(tparm(term->TI_setab, ansitab[i], 0)); + } else if (term->TI_setb) { + for (i = 0; i < 8; i++) + term->TI_bg[i] = g_strdup(tparm(term->TI_setb, i, 0)); } else if (force) { for (i = 0; i < 8; i++) term->TI_bg[i] = g_strdup_printf("\033[%dm", 40+ansitab[i]); -- cgit v1.2.3