summaryrefslogtreecommitdiffstats
path: root/cmd-set-option.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-04 05:40:35 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-04 05:40:35 +0000
commit811e75da52a0b504db4221df4504d3594ba3cb8b (patch)
treec68e6c59f4d3814fea41e6dae6bfb795c98ee7a7 /cmd-set-option.c
parent9e6090a7a2a0d25499bce0dc68fd67289f3a5e39 (diff)
Status bar left and right strings (set with status-left and status-right), and automatic update (at interval set by status-interval).
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r--cmd-set-option.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c
index 3a47583f..49aac0d7 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-set-option.c,v 1.19 2008-06-03 21:42:37 nicm Exp $ */
+/* $Id: cmd-set-option.c,v 1.20 2008-06-04 05:40:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -242,6 +242,18 @@ cmd_set_option_exec(void *ptr, unused struct cmd_ctx *ctx)
return;
}
options_set_number(oo, "history-limit", number);
+ } else if (strcmp(data->option, "status-left") == 0) {
+ if (data->value == NULL) {
+ ctx->error(ctx, "invalid value");
+ return;
+ }
+ options_set_string(oo, "status-left", "%s", data->value);
+ } else if (strcmp(data->option, "status-right") == 0) {
+ if (data->value == NULL) {
+ ctx->error(ctx, "invalid value");
+ return;
+ }
+ options_set_string(oo, "status-right", "%s", data->value);
} else {
ctx->error(ctx, "unknown option: %s", data->option);
return;