From 88b83be07b0c080a460db393d292c9a0b3c05c39 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sun, 9 Aug 2009 16:50:57 +0000 Subject: Sync OpenBSD patchset 220: 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. --- window-copy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'window-copy.c') diff --git a/window-copy.c b/window-copy.c index 58ea727c..d6b33116 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1,4 +1,4 @@ -/* $Id: window-copy.c,v 1.72 2009-07-30 20:32:05 tcunha Exp $ */ +/* $Id: window-copy.c,v 1.73 2009-08-09 16:50:57 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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. */ -- cgit