mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Make message-limit a server option.
This commit is contained in:
6
status.c
6
status.c
@ -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++) {
|
||||
|
Reference in New Issue
Block a user