mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
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
This commit is contained in:
parent
7e58590958
commit
5da4a4fe89
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user