summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window-clock.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2016-07-15 00:42:56 +0000
committernicm <nicm@openbsd.org>2016-07-15 00:42:56 +0000
commit92c661c58a8104b40f0f5a264118afa8ed14a97a (patch)
treefba1f353ba5c641f8b729defd1a30d25d874a4e9 /usr.bin/tmux/window-clock.c
parentAdd a ProxyJump ssh_config(5) option and corresponding -J ssh(1) (diff)
downloadwireguard-openbsd-92c661c58a8104b40f0f5a264118afa8ed14a97a.tar.xz
wireguard-openbsd-92c661c58a8104b40f0f5a264118afa8ed14a97a.zip
Instead of representing colours in several different forms with various
cell flags, convert to use an int with flags marking 256 or RGB colours in the top byte (except in cells, which we don't want to make any bigger). From Brad Town.
Diffstat (limited to 'usr.bin/tmux/window-clock.c')
-rw-r--r--usr.bin/tmux/window-clock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/window-clock.c b/usr.bin/tmux/window-clock.c
index 8459f3f5149..d569e680df0 100644
--- a/usr.bin/tmux/window-clock.c
+++ b/usr.bin/tmux/window-clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window-clock.c,v 1.17 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: window-clock.c,v 1.18 2016/07/15 00:42:56 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -230,7 +230,7 @@ window_clock_draw_screen(struct window_pane *wp)
screen_write_cursormove(&ctx, x, y);
memcpy(&gc, &grid_default_cell, sizeof gc);
- colour_set_fg(&gc, colour);
+ gc.fg = colour;
screen_write_puts(&ctx, &gc, "%s", tim);
}
@@ -242,7 +242,7 @@ window_clock_draw_screen(struct window_pane *wp)
y = (screen_size_y(s) / 2) - 3;
memcpy(&gc, &grid_default_cell, sizeof gc);
- colour_set_bg(&gc, colour);
+ gc.bg = colour;
for (ptr = tim; *ptr != '\0'; ptr++) {
if (*ptr >= '0' && *ptr <= '9')
idx = *ptr - '0';