1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

when colors aren't used, don't save last_fg and last_bg. This helps at least clrtoeol().

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1942 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-29 19:16:14 +00:00 committed by cras
parent 3cdedf5b4b
commit 3d50a058b9

View File

@ -224,9 +224,10 @@ void term_set_color(TERM_WINDOW *window, int col)
/* set foreground color */
if ((col & 0x0f) != last_fg &&
((col & 0x0f) != 0 || (col & ATTR_RESETFG) == 0)) {
last_fg = col & 0x0f;
if (term_use_colors)
if (term_use_colors) {
last_fg = col & 0x0f;
terminfo_set_fg(last_fg);
}
}
/* set background color */
@ -237,9 +238,10 @@ void term_set_color(TERM_WINDOW *window, int col)
if ((col & 0xf0) >> 4 != last_bg &&
((col & 0xf0) != 0 || (col & ATTR_RESETBG) == 0)) {
last_bg = (col & 0xf0) >> 4;
if (term_use_colors)
if (term_use_colors) {
terminfo_set_bg(last_bg);
last_bg = (col & 0xf0) >> 4;
}
}
/* bold */