aboutsummaryrefslogtreecommitdiff
path: root/window-more.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-10 17:16:24 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-10 17:16:24 +0000
commit372a8cb1d9c4306f74b592660b4ce394dff3e31d (patch)
treef1f14875c69932859e6d65365a4742a6ee095652 /window-more.c
parent3f3b01c7ce503d98ab649fa4aecde741ce63cec0 (diff)
downloadrtmux-372a8cb1d9c4306f74b592660b4ce394dff3e31d.tar.gz
rtmux-372a8cb1d9c4306f74b592660b4ce394dff3e31d.tar.bz2
rtmux-372a8cb1d9c4306f74b592660b4ce394dff3e31d.zip
Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".
Diffstat (limited to 'window-more.c')
-rw-r--r--window-more.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/window-more.c b/window-more.c
index 1ac453cc..94a08f1e 100644
--- a/window-more.c
+++ b/window-more.c
@@ -164,6 +164,7 @@ window_more_write_line(
{
struct window_more_mode_data *data = wp->modedata;
struct screen *s = &data->screen;
+ struct options *oo = &wp->window->options;
struct grid_cell gc;
char *msg, hdr[32];
size_t size;
@@ -176,9 +177,9 @@ 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.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");
+ colour_set_fg(&gc, options_get_number(oo, "mode-fg"));
+ colour_set_bg(&gc, options_get_number(oo, "mode-bg"));
+ gc.attr |= options_get_number(oo, "mode-attr");
screen_write_puts(ctx, &gc, "%s", hdr);
memcpy(&gc, &grid_default_cell, sizeof gc);
} else