summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortim <tim>2015-11-22 18:28:01 +0000
committertim <tim>2015-11-22 18:28:01 +0000
commit4fcc02ee9dde0f11f6a6db77b2ba6271421cea78 (patch)
treed5250534c83865f06602d75c9489c10933968340
parent933929cd622478bb43afe590670613da2e9ff359 (diff)
If display-time is set to 0, show status messages until a key is pressed;
OK nicm@
-rw-r--r--options-table.c2
-rw-r--r--status.c16
-rw-r--r--tmux.11
3 files changed, 11 insertions, 8 deletions
diff --git a/options-table.c b/options-table.c
index a0e65ff4..dc4922ba 100644
--- a/options-table.c
+++ b/options-table.c
@@ -198,7 +198,7 @@ const struct options_table_entry options_table[] = {
{ .name = "display-time",
.type = OPTIONS_TABLE_NUMBER,
.scope = OPTIONS_TABLE_SESSION,
- .minimum = 1,
+ .minimum = 0,
.maximum = INT_MAX,
.default_num = 750
},
diff --git a/status.c b/status.c
index cbba2ead..d05376c0 100644
--- a/status.c
+++ b/status.c
@@ -574,13 +574,15 @@ status_message_set(struct client *c, const char *fmt, ...)
}
delay = options_get_number(c->session->options, "display-time");
- tv.tv_sec = delay / 1000;
- tv.tv_usec = (delay % 1000) * 1000L;
-
- if (event_initialized(&c->message_timer))
- evtimer_del(&c->message_timer);
- evtimer_set(&c->message_timer, status_message_callback, c);
- evtimer_add(&c->message_timer, &tv);
+ if (delay > 0) {
+ tv.tv_sec = delay / 1000;
+ tv.tv_usec = (delay % 1000) * 1000L;
+
+ if (event_initialized(&c->message_timer))
+ evtimer_del(&c->message_timer);
+ evtimer_set(&c->message_timer, status_message_callback, c);
+ evtimer_add(&c->message_timer, &tv);
+ }
c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE);
c->flags |= CLIENT_STATUS;
diff --git a/tmux.1 b/tmux.1
index a22bb3f3..3fd383d6 100644
--- a/tmux.1
+++ b/tmux.1
@@ -2557,6 +2557,7 @@ command appear.
.It Ic display-time Ar time
Set the amount of time for which status line messages and other on-screen
indicators are displayed.
+If set to 0, messages and indicators are displayed until a key is pressed.
.Ar time
is in milliseconds.
.It Ic history-limit Ar lines