aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-21 09:34:45 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-21 09:34:45 +0000
commit07b3e7606205c79c74a39b3ad6e2c91c60699ebc (patch)
treeb2636e6e5ee897a1e6821141577475f9f0f6512d /render.c
parentosc: add TODO (diff)
parentcsi: pick 16 first 256-colors directly from the term struct (diff)
Merge branch 'config-color'
Diffstat (limited to 'render.c')
-rw-r--r--render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/render.c b/render.c
index 5b3c2956..f9c7fbca 100644
--- a/render.c
+++ b/render.c
@@ -105,10 +105,10 @@ render_cell(struct terminal *term, struct buffer *buf, const struct cell *cell,
uint32_t _fg = cell->attrs.foreground >> 31
? cell->attrs.foreground
- : !term->reverse ? term->foreground : term->background;
+ : !term->reverse ? term->colors.fg : term->colors.bg;
uint32_t _bg = cell->attrs.background >> 31
? cell->attrs.background
- : !term->reverse ? term->background : term->foreground;
+ : !term->reverse ? term->colors.bg : term->colors.fg;
/* If *one* is set, we reverse */
if (has_cursor ^ cell->attrs.reverse ^ is_selected) {
@@ -307,7 +307,7 @@ grid_render(struct terminal *term)
int rmargin_width = term->width - rmargin;
int bmargin_height = term->height - bmargin;
- uint32_t _bg = !term->reverse ? term->background : term->foreground;
+ uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg;
struct rgb bg = color_hex_to_rgb(_bg);
cairo_set_source_rgb(buf->cairo, bg.r, bg.g, bg.b);