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 /screen-redraw.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 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index 649b8f5f..466c3569 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -1,4 +1,4 @@ -/* $Id: screen-redraw.c,v 1.46 2009-08-31 22:30:15 tcunha Exp $ */ +/* $Id: screen-redraw.c,v 1.47 2009-09-11 14:13:52 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -240,7 +240,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) struct session *s = c->session; struct grid_cell gc; u_int idx, px, py, i, j; - u_char colour; + int colour; char buf[16], *ptr; size_t len; @@ -256,7 +256,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) if (wp->sx < len * 6 || wp->sy < 5) { tty_cursor(tty, px - len / 2, py, wp->xoff, wp->yoff); memcpy(&gc, &grid_default_cell, sizeof gc); - gc.fg = colour; + colour_set_fg(&gc, colour); tty_attributes(tty, &gc); tty_puts(tty, buf); return; @@ -266,7 +266,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) py -= 2; memcpy(&gc, &grid_default_cell, sizeof gc); - gc.bg = colour; + colour_set_bg(&gc, colour); tty_attributes(tty, &gc); for (ptr = buf; *ptr != '\0'; ptr++) { if (*ptr < '0' || *ptr > '9') @@ -276,9 +276,8 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) for (j = 0; j < 5; j++) { for (i = px; i < px + 5; i++) { tty_cursor(tty, i, py + j, wp->xoff, wp->yoff); - if (!clock_table[idx][j][i - px]) - continue; - tty_putc(tty, ' '); + if (clock_table[idx][j][i - px]) + tty_putc(tty, ' '); } } px += 6; |