summaryrefslogtreecommitdiffstats
path: root/window-copy.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-copy.c
parent3f3b01c7ce503d98ab649fa4aecde741ce63cec0 (diff)
Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".
Diffstat (limited to 'window-copy.c')
-rw-r--r--window-copy.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/window-copy.c b/window-copy.c
index bacd6ad9..053a6a49 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -660,14 +660,15 @@ window_copy_write_line(
{
struct window_copy_mode_data *data = wp->modedata;
struct screen *s = &data->screen;
+ struct options *oo = &wp->window->options;
struct grid_cell gc;
char hdr[32];
size_t last, xoff = 0, size = 0;
memcpy(&gc, &grid_default_cell, sizeof gc);
- 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");
last = screen_size_y(s) - 1;
if (py == 0) {
@@ -765,6 +766,7 @@ window_copy_update_selection(struct window_pane *wp)
{
struct window_copy_mode_data *data = wp->modedata;
struct screen *s = &data->screen;
+ struct options *oo = &wp->window->options;
struct grid_cell gc;
u_int sx, sy, ty;
@@ -773,9 +775,9 @@ window_copy_update_selection(struct window_pane *wp)
/* Set colours. */
memcpy(&gc, &grid_default_cell, sizeof gc);
- 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");
/* Find top of screen. */
ty = screen_hsize(&wp->base) - data->oy;