aboutsummaryrefslogtreecommitdiff
path: root/format-draw.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-10-26 16:01:11 +0100
committerThomas Adam <thomas@xteddy.org>2021-10-26 16:01:11 +0100
commitc77924bb56800c671d96aa64b887d1ddf033ad94 (patch)
treeb62642fb383466eef9e2dadd53bda5490348304b /format-draw.c
parent6f46f71d58d508703c29ddc50c04bb4b56603e20 (diff)
parent9695114230613f57c11936ae0e1fe2cd6ba0a7b4 (diff)
downloadrtmux-c77924bb56800c671d96aa64b887d1ddf033ad94.tar.gz
rtmux-c77924bb56800c671d96aa64b887d1ddf033ad94.tar.bz2
rtmux-c77924bb56800c671d96aa64b887d1ddf033ad94.zip
Merge branch 'obsd-master' into master
Diffstat (limited to 'format-draw.c')
-rw-r--r--format-draw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/format-draw.c b/format-draw.c
index 6164cc44..1110535f 100644
--- a/format-draw.c
+++ b/format-draw.c
@@ -677,7 +677,8 @@ format_draw_many(struct screen_write_ctx *ctx, struct style *sy, char ch,
/* Draw a format to a screen. */
void
format_draw(struct screen_write_ctx *octx, const struct grid_cell *base,
- u_int available, const char *expanded, struct style_ranges *srs)
+ u_int available, const char *expanded, struct style_ranges *srs,
+ int default_colours)
{
enum { LEFT,
CENTRE,
@@ -819,6 +820,10 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base,
log_debug("%s: style '%s' -> '%s'", __func__, tmp,
style_tostring(&sy));
free(tmp);
+ if (default_colours) {
+ sy.gc.bg = base->bg;
+ sy.gc.fg = base->fg;
+ }
/* If this style has a fill colour, store it for later. */
if (sy.fill != 8)