summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-set-option.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-06-16 08:18:34 +0000
committernicm <nicm@openbsd.org>2020-06-16 08:18:34 +0000
commit94c0d63c076ee3ed0c62d2cf002139621b3fe895 (patch)
tree44e48740ec150c2ef7ab2a8e459576fd1934fa27 /usr.bin/tmux/cmd-set-option.c
parentCorrectly move to previous line when looking for previous word, from (diff)
downloadwireguard-openbsd-94c0d63c076ee3ed0c62d2cf002139621b3fe895.tar.xz
wireguard-openbsd-94c0d63c076ee3ed0c62d2cf002139621b3fe895.zip
d and D keys to reset to default in customize mode.
Diffstat (limited to 'usr.bin/tmux/cmd-set-option.c')
-rw-r--r--usr.bin/tmux/cmd-set-option.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c
index 24b8a22c4dc..6c05a004b3c 100644
--- a/usr.bin/tmux/cmd-set-option.c
+++ b/usr.bin/tmux/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-option.c,v 1.136 2020/05/16 16:50:55 nicm Exp $ */
+/* $OpenBSD: cmd-set-option.c,v 1.137 2020/06/16 08:18:34 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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;