diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-03-18 15:07:51 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-03-18 15:07:51 +0000 |
commit | acb2413852b98745b69459d0cdd0d9698cb75e2c (patch) | |
tree | 6af803240715b8a6bccc328d5eda14f237e44944 /cmd-set-option.c | |
parent | aa2b3472c515dd1e5f57618e17c0c612cfa3c117 (diff) | |
parent | ce6be7afd4d10b542f9cce8634d6bdd81754f775 (diff) | |
download | rtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.tar.gz rtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.tar.bz2 rtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r-- | cmd-set-option.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c index c4b82004..ddbfc334 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -163,11 +163,9 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item) parent = options_get(oo, name); /* Check that array options and indexes match up. */ - if (idx != -1) { - if (*name == '@' || options_array_size(parent, NULL) == -1) { - cmdq_error(item, "not an array: %s", argument); - goto fail; - } + if (idx != -1 && (*name == '@' || !options_isarray(parent))) { + cmdq_error(item, "not an array: %s", argument); + goto fail; } /* With -o, check this option is not already set. */ @@ -209,7 +207,7 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item) goto fail; } options_set_string(oo, name, append, "%s", value); - } else if (idx == -1 && options_array_size(parent, NULL) == -1) { + } else if (idx == -1 && !options_isarray(parent)) { error = cmd_set_option_set(self, item, oo, parent, value); if (error != 0) goto fail; @@ -264,7 +262,7 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item) layout_fix_panes(w); } RB_FOREACH(s, sessions, &sessions) - status_update_saved(s); + status_update_cache(s); /* * Update sizes and redraw. May not always be necessary but do it |