aboutsummaryrefslogtreecommitdiff
path: root/cmd-set-option.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-06-16 10:01:21 +0100
committerThomas Adam <thomas@xteddy.org>2020-06-16 10:01:21 +0100
commiteb448daa1a07fa25a9928791cdc8411da271a9bc (patch)
treedf8e81d6e1895384dc83f59f536c51ad1af1baf6 /cmd-set-option.c
parent824efe7be47ff534d57da1ab66c3d0dfde86992d (diff)
parent1bf9555e4f1ad19e1e6f97ede6fb19808ff1c267 (diff)
downloadrtmux-eb448daa1a07fa25a9928791cdc8411da271a9bc.tar.gz
rtmux-eb448daa1a07fa25a9928791cdc8411da271a9bc.tar.bz2
rtmux-eb448daa1a07fa25a9928791cdc8411da271a9bc.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r--cmd-set-option.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c
index 36579f29..0df12aa0 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -151,16 +151,7 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'u')) {
if (o == NULL)
goto out;
- if (idx == -1) {
- if (*name == '@')
- options_remove(o);
- else if (oo == global_options ||
- oo == global_s_options ||
- oo == global_w_options)
- options_default(oo, options_table_entry(o));
- else
- options_remove(o);
- } else if (options_array_set(o, idx, NULL, 0, &cause) != 0) {
+ if (options_remove_or_default(o, idx, &cause) != 0) {
cmdq_error(item, "%s", cause);
free(cause);
goto fail;