summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorAilin Nemui <ailin@esf51.localdomain>2014-07-23 23:38:38 +0200
committerAilin Nemui <ailin@esf51.localdomain>2014-07-23 23:42:05 +0200
commit41fab0707f92871c23884395a5efaf2aaa651b66 (patch)
tree965754bb7a09179d6a69369c840b3044d6ec1493 /src/fe-text
parent5ddf127f6d5e32450ce4db10d756f924cdbc946b (diff)
downloadirssi-41fab0707f92871c23884395a5efaf2aaa651b66.zip
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
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/term-terminfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c
index a0b257c4..529faeb9 100644
--- a/src/fe-text/term-terminfo.c
+++ b/src/fe-text/term-terminfo.c
@@ -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);