summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTim van der Molen <tim@cvs.openbsd.org>2015-11-22 18:28:02 +0000
committerTim van der Molen <tim@cvs.openbsd.org>2015-11-22 18:28:02 +0000
commit779be168e531ef9dd6d9230c65a054af2a0c6b9d (patch)
tree6a37b2bc30bc5dafd34b801c7f246f1e7dac75ab /usr.bin
parent7bccbd57516afa4b34af5ee0f4118fc2447ae76f (diff)
If display-time is set to 0, show status messages until a key is pressed;
OK nicm@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/options-table.c4
-rw-r--r--usr.bin/tmux/status.c18
-rw-r--r--usr.bin/tmux/tmux.15
3 files changed, 15 insertions, 12 deletions
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c
index 677791f8efb..ff070c52b04 100644
--- a/usr.bin/tmux/options-table.c
+++ b/usr.bin/tmux/options-table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options-table.c,v 1.67 2015/11/20 12:01:19 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.68 2015/11/22 18:28:01 tim Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 87dbac0c078..2ea0ffad032 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.142 2015/11/20 12:01:19 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.143 2015/11/22 18:28:01 tim Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index af40d3e0137..a9722fe52e0 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.461 2015/11/18 14:13:55 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.462 2015/11/22 18:28:01 tim Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 18 2015 $
+.Dd $Mdocdate: November 22 2015 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -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