diff options
author | 2009-08-05 16:26:38 +0000 | |
---|---|---|
committer | 2009-08-05 16:26:38 +0000 | |
commit | 3da0ca69ac6e4088509288fe8f961cc6fb08a49d (patch) | |
tree | 744d848fb1d2d6c5c24794368bef6be7b062651e /usr.bin/tmux/window-copy.c | |
parent | Mention known signal problems and firmware version 3 only support so (diff) | |
download | wireguard-openbsd-3da0ca69ac6e4088509288fe8f961cc6fb08a49d.tar.xz wireguard-openbsd-3da0ca69ac6e4088509288fe8f961cc6fb08a49d.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 'usr.bin/tmux/window-copy.c')
-rw-r--r-- | usr.bin/tmux/window-copy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index 1024d9eb702..bcb8f957afc 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.13 2009/07/30 07:04:50 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.14 2009/08/05 16:26:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -264,8 +264,8 @@ window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx, u_i memcpy(&gc, &grid_default_cell, sizeof gc); size = xsnprintf(hdr, sizeof hdr, "[%u,%u/%u]", data->ox, data->oy, screen_hsize(&wp->base)); - 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_cursormove(ctx, screen_size_x(s) - size, 0); screen_write_puts(ctx, &gc, "%s", hdr); @@ -368,8 +368,8 @@ window_copy_update_selection(struct window_pane *wp) /* Set colours. */ memcpy(&gc, &grid_default_cell, sizeof gc); - 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"); /* Find top-left of screen. */ |