From bcddddf98d46bb9aef919d8e93b7328a7b040140 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 5 Aug 2009 16:26:38 +0000 Subject: 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-scroll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'window-scroll.c') diff --git a/window-scroll.c b/window-scroll.c index 12249fc1..bdb7d559 100644 --- a/window-scroll.c +++ b/window-scroll.c @@ -176,8 +176,8 @@ window_scroll_write_line( 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); -- cgit