From 1bf9555e4f1ad19e1e6f97ede6fb19808ff1c267 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 16 Jun 2020 08:18:34 +0000 Subject: d and D keys to reset to default in customize mode. --- cmd-set-option.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'cmd-set-option.c') 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; -- cgit