summaryrefslogtreecommitdiff
path: root/src/fe-text/textbuffer-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r--src/fe-text/textbuffer-view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c
index a5d7f2ed..d98fc85c 100644
--- a/src/fe-text/textbuffer-view.c
+++ b/src/fe-text/textbuffer-view.c
@@ -114,7 +114,7 @@ static void update_cmd_color(unsigned char cmd, int *color)
if ((cmd & LINE_COLOR_DEFAULT) == 0)
*color |= (cmd & 0x0f) << 4;
else {
- *color |= ATTR_RESETBG;
+ *color = (*color & FGATTR) | ATTR_RESETBG;
if (cmd & LINE_COLOR_BLINK)
*color |= ATTR_BLINK;
}
@@ -124,7 +124,7 @@ static void update_cmd_color(unsigned char cmd, int *color)
if ((cmd & LINE_COLOR_DEFAULT) == 0)
*color |= cmd & 0x0f;
else {
- *color |= ATTR_RESETFG;
+ *color = (*color & BGATTR) | ATTR_RESETFG;
if (cmd & LINE_COLOR_BOLD)
*color |= ATTR_BOLD;
}