aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tty.c b/tty.c
index 459db0a4..75986ef0 100644
--- a/tty.c
+++ b/tty.c
@@ -1005,6 +1005,8 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc)
(gc->flags & GRID_FLAG_FG256) != (tc->flags & GRID_FLAG_FG256)) {
tty_attributes_fg(tty, gc);
tc->fg = fg;
+ tc->flags &= ~GRID_FLAG_FG256;
+ tc->flags |= gc->flags & GRID_FLAG_FG256;
}
/* Set background colour. */
@@ -1012,6 +1014,8 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc)
(gc->flags & GRID_FLAG_BG256) != (tc->flags & GRID_FLAG_BG256)) {
tty_attributes_bg(tty, gc);
tc->bg = bg;
+ tc->flags &= ~GRID_FLAG_BG256;
+ tc->flags |= gc->flags & GRID_FLAG_BG256;
}
}