summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-03-31 21:41:36 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-03-31 21:41:36 +0000
commit839ebd256a8eeb0d93c0bda8a41c6add71da179b (patch)
tree84bcbd12f2c9665828ee2868db9fc27495b9df2a
parent8765f5d395c94852042ba6b88499d1c55a43c045 (diff)
Make message-limit a server option.
-rw-r--r--usr.bin/tmux/options-table.c16
-rw-r--r--usr.bin/tmux/status.c8
-rw-r--r--usr.bin/tmux/tmux.112
3 files changed, 16 insertions, 20 deletions
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c
index 002fb9739e2..fe95ffb56c3 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.45 2014/02/23 00:53:06 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.46 2014/03/31 21:41:35 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -81,6 +81,13 @@ const struct options_table_entry server_options_table[] = {
.default_num = 0
},
+ { .name = "message-limit",
+ .type = OPTIONS_TABLE_NUMBER,
+ .minimum = 0,
+ .maximum = INT_MAX,
+ .default_num = 100
+ },
+
{ .name = "quiet",
.type = OPTIONS_TABLE_FLAG,
.default_num = 0 /* overridden in main() */
@@ -243,13 +250,6 @@ const struct options_table_entry session_options_table[] = {
.style = "message-style"
},
- { .name = "message-limit",
- .type = OPTIONS_TABLE_NUMBER,
- .minimum = 0,
- .maximum = INT_MAX,
- .default_num = 20
- },
-
{ .name = "message-style",
.type = OPTIONS_TABLE_STYLE,
.default_str = "bg=yellow,fg=black"
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 4ff945da56e..17ab9b4afaa 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.110 2014/02/14 13:59:01 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.111 2014/03/31 21:41:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -655,7 +655,6 @@ void printflike2
status_message_set(struct client *c, const char *fmt, ...)
{
struct timeval tv;
- struct session *s = c->session;
struct message_entry *msg;
va_list ap;
int delay;
@@ -673,10 +672,7 @@ status_message_set(struct client *c, const char *fmt, ...)
msg->msg_time = time(NULL);
msg->msg = xstrdup(c->message_string);
- if (s == NULL)
- limit = 0;
- else
- limit = options_get_number(&s->options, "message-limit");
+ limit = options_get_number(&global_options, "message-limit");
if (ARRAY_LENGTH(&c->message_log) > limit) {
limit = ARRAY_LENGTH(&c->message_log) - limit;
for (i = 0; i < limit; i++) {
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 16fab04fbdd..ae110336284 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.383 2014/03/31 21:39:31 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.384 2014/03/31 21:41:35 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -778,7 +778,7 @@ Show client messages or server information.
Any messages displayed on the status line are saved in a per-client message
log, up to a maximum of the limit set by the
.Ar message-limit
-session option for the session attached to that client.
+server option.
With
.Fl t ,
display the log for
@@ -2134,6 +2134,10 @@ passed through to applications running in
.Nm .
Attached clients should be detached and attached again after changing this
option.
+.It Ic message-limit Ar number
+Set the number of error or information messages to save in the message log for
+each client.
+The default is 100.
.It Xo Ic quiet
.Op Ic on | off
.Xc
@@ -2391,10 +2395,6 @@ With the
flag to the
.Ic set-option
command the new style is added otherwise the existing style is replaced.
-.It Ic message-limit Ar number
-Set the number of error or information messages to save in the message log for
-each client.
-The default is 20.
.It Ic message-style Ar style
Set status line message style.
For how to specify