diff options
author | Valentin Batz <senneth@irssi.org> | 2006-01-31 19:06:20 +0000 |
---|---|---|
committer | vb <vb@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2006-01-31 19:06:20 +0000 |
commit | 5da4a4fe8911837c7ddbf45fc36a92c47446e0d2 (patch) | |
tree | 78ca70400e07ebde145e7966f1e4673a848c883e /src/fe-text/terminfo-core.c | |
parent | 7e585909588d5453fabc0a74b7f1bb25a60ba974 (diff) | |
download | irssi-5da4a4fe8911837c7ddbf45fc36a92c47446e0d2.zip |
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
Diffstat (limited to 'src/fe-text/terminfo-core.c')
-rw-r--r-- | src/fe-text/terminfo-core.c | 16 |
1 files 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]); |