forked from PsychoticNinja/irssi
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:
parent
3cdedf5b4b
commit
3d50a058b9
@ -224,10 +224,11 @@ void term_set_color(TERM_WINDOW *window, int col)
|
|||||||
/* set foreground color */
|
/* set foreground color */
|
||||||
if ((col & 0x0f) != last_fg &&
|
if ((col & 0x0f) != last_fg &&
|
||||||
((col & 0x0f) != 0 || (col & ATTR_RESETFG) == 0)) {
|
((col & 0x0f) != 0 || (col & ATTR_RESETFG) == 0)) {
|
||||||
|
if (term_use_colors) {
|
||||||
last_fg = col & 0x0f;
|
last_fg = col & 0x0f;
|
||||||
if (term_use_colors)
|
|
||||||
terminfo_set_fg(last_fg);
|
terminfo_set_fg(last_fg);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* set background color */
|
/* set background color */
|
||||||
if (col & ATTR_BLINK)
|
if (col & ATTR_BLINK)
|
||||||
@ -237,9 +238,10 @@ void term_set_color(TERM_WINDOW *window, int col)
|
|||||||
|
|
||||||
if ((col & 0xf0) >> 4 != last_bg &&
|
if ((col & 0xf0) >> 4 != last_bg &&
|
||||||
((col & 0xf0) != 0 || (col & ATTR_RESETBG) == 0)) {
|
((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);
|
terminfo_set_bg(last_bg);
|
||||||
|
last_bg = (col & 0xf0) >> 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bold */
|
/* bold */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user