aboutsummaryrefslogtreecommitdiff
path: root/window-more.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-05 16:26:38 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-05 16:26:38 +0000
commitbcddddf98d46bb9aef919d8e93b7328a7b040140 (patch)
tree08371106a8988983ca50dc6af2b8071116e798a3 /window-more.c
parent12ef3ceda13f9ae4c77384f98e6f145322971e69 (diff)
downloadrtmux-bcddddf98d46bb9aef919d8e93b7328a7b040140.tar.gz
rtmux-bcddddf98d46bb9aef919d8e93b7328a7b040140.tar.bz2
rtmux-bcddddf98d46bb9aef919d8e93b7328a7b040140.zip
If colours are not supported by the terminal, try to emulate a coloured
background by setting or clearing the reverse attribute. This makes a few applications which don't use the reverse attribute themselves a little happier, and allows the status, message and mode options to have default attributes and fg/bg options that work as expected when set as reverse.
Diffstat (limited to 'window-more.c')
-rw-r--r--window-more.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/window-more.c b/window-more.c
index a3418eb0..9eefd79f 100644
--- a/window-more.c
+++ b/window-more.c
@@ -176,8 +176,8 @@ window_more_write_line(
size = xsnprintf(hdr, sizeof hdr,
"[%u/%u]", data->top, ARRAY_LENGTH(&data->list));
screen_write_cursormove(ctx, screen_size_x(s) - size, 0);
- gc.bg = options_get_number(&wp->window->options, "mode-fg");
- gc.fg = options_get_number(&wp->window->options, "mode-bg");
+ gc.fg = options_get_number(&wp->window->options, "mode-fg");
+ gc.bg = options_get_number(&wp->window->options, "mode-bg");
gc.attr |= options_get_number(&wp->window->options, "mode-attr");
screen_write_puts(ctx, &gc, "%s", hdr);
memcpy(&gc, &grid_default_cell, sizeof gc);