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

restore the colour 0 ("black") that got broken by extended colours

the colour 0 was broken by the extended colours patch because it needs
an explicit bit check (lower bits will be false since it is 0)

Thanks to lhynes for the report
This commit is contained in:
Ailin Nemui 2014-07-23 23:38:38 +02:00
parent 5ddf127f6d
commit 41fab0707f

View File

@ -370,7 +370,7 @@ void term_set_color(TERM_WINDOW *window, int col)
(fg != 0 || (col & ATTR_RESETFG) == 0)) {
if (term_use_colors) {
last_fg = fg;
if (!(fg & 0xff))
if (fg && !(fg & 0xff))
termctl_set_color_24bit(0, last_fg >> 8);
else
terminfo_set_fg(last_fg);
@ -387,7 +387,7 @@ void term_set_color(TERM_WINDOW *window, int col)
(bg != 0 || (col & ATTR_RESETBG) == 0)) {
if (term_use_colors) {
last_bg = bg;
if (!(bg & 0xff))
if (bg && !(bg & 0xff))
termctl_set_color_24bit(1, last_bg >> 8);
else
terminfo_set_bg(last_bg);