diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-09-11 14:13:52 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-09-11 14:13:52 +0000 |
commit | 0ec1ce005c98f4fa1813cf47e4bcc11d8cd4b523 (patch) | |
tree | 91a9f9bb7432bfaeb28b0be6c5280582b045181d /window-copy.c | |
parent | f0cb57d8ac1a342c862320e30728ae2c1ea556aa (diff) | |
download | rtmux-0ec1ce005c98f4fa1813cf47e4bcc11d8cd4b523.tar.gz rtmux-0ec1ce005c98f4fa1813cf47e4bcc11d8cd4b523.tar.bz2 rtmux-0ec1ce005c98f4fa1813cf47e4bcc11d8cd4b523.zip |
Sync OpenBSD patchset 322:
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.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/window-copy.c b/window-copy.c index bafdaf75..e5d4bc86 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1,4 +1,4 @@ -/* $Id: window-copy.c,v 1.85 2009-09-07 23:48:54 tcunha Exp $ */ +/* $Id: window-copy.c,v 1.86 2009-09-11 14:13:52 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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; |