mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-17 00:51:36 +02:00
display-time option to set message display time.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-set-option.c,v 1.32 2008-06-19 22:04:02 nicm Exp $ */
|
||||
/* $Id: cmd-set-option.c,v 1.33 2008-06-19 23:20:45 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -236,6 +236,20 @@ cmd_set_option_exec(struct cmd *self, unused struct cmd_ctx *ctx)
|
||||
return;
|
||||
}
|
||||
options_set_number(oo, "history-limit", number);
|
||||
} else if (strcmp(data->option, "display-time") == 0) {
|
||||
if (data->value == NULL || number == -1) {
|
||||
ctx->error(ctx, "invalid value");
|
||||
return;
|
||||
}
|
||||
if (errstr != NULL) {
|
||||
ctx->error(ctx, "display-time %s", errstr);
|
||||
return;
|
||||
}
|
||||
if (number > INT_MAX) {
|
||||
ctx->error(ctx, "display-time too big: %u", number);
|
||||
return;
|
||||
}
|
||||
options_set_number(oo, "display-time", number);
|
||||
} else if (strcmp(data->option, "status-left") == 0) {
|
||||
if (data->value == NULL) {
|
||||
ctx->error(ctx, "invalid value");
|
||||
|
Reference in New Issue
Block a user