summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-08-31 20:46:20 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-08-31 20:46:20 +0000
commitb3d19f3bfd39a96bc976abf38ce158e212394563 (patch)
tree8f5dfd575b04d6eb71ec090fb8389cfb2c53f77c /usr.bin/tmux/status.c
parent6d6be4848445d3989ec1d654b09cd35891f1e71e (diff)
Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each pane.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r--usr.bin/tmux/status.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 9d0accbc3c9..5afb11e1ee1 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.27 2009/08/19 10:39:50 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.28 2009/08/31 20:46:19 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -541,13 +541,14 @@ status_message_set(struct client *c, const char *fmt, ...)
status_prompt_clear(c);
status_message_clear(c);
+ va_start(ap, fmt);
+ xvasprintf(&c->message_string, fmt, ap);
+ va_end(ap);
+
delay = options_get_number(&c->session->options, "display-time");
tv.tv_sec = delay / 1000;
tv.tv_usec = (delay % 1000) * 1000L;
- va_start(ap, fmt);
- xvasprintf(&c->message_string, fmt, ap);
- va_end(ap);
if (gettimeofday(&c->message_timer, NULL) != 0)
fatal("gettimeofday");
timeradd(&c->message_timer, &tv, &c->message_timer);