diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-10-25 09:22:18 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-10-25 09:22:18 +0000 |
commit | b0483ad533c87cd6775fe233ae9fc187f7f9fdc8 (patch) | |
tree | 0fd6b167acd49a5e683012dd9260cb0acc0436ec /usr.bin/tmux/screen-write.c | |
parent | f11c350767e59b44f00b39c6bdd75cbec5e07ed3 (diff) |
Instead of setting the popup default colours in the draw callback, set
it up in popup_display and follow the same routine as panes in the draw
and init_ctx callbacks - use the palette if the option value is default.
Allows application-set fg and bg to work in panes again.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r-- | usr.bin/tmux/screen-write.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 43184034dd6..80050437dbc 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.202 2021/10/20 09:50:40 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.203 2021/10/25 09:22:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -184,8 +184,10 @@ screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx, if (ctx->init_ctx_cb != NULL) { ctx->init_ctx_cb(ctx, ttyctx); if (ttyctx->palette != NULL) { - ttyctx->defaults.fg = ttyctx->palette->fg; - ttyctx->defaults.bg = ttyctx->palette->bg; + if (COLOUR_DEFAULT(ttyctx->defaults.fg)) + ttyctx->defaults.fg = ttyctx->palette->fg; + if (COLOUR_DEFAULT(ttyctx->defaults.bg)) + ttyctx->defaults.bg = ttyctx->palette->bg; } } else { ttyctx->redraw_cb = screen_write_redraw_cb; |