From: nicm Date: Fri, 22 Dec 2017 10:18:51 +0000 (+0000) Subject: Do not try to set default value on user options (they don't have one), X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5244352925cacd93ac03abfa6f24c7f25b9a75b1;p=openbsd Do not try to set default value on user options (they don't have one), from Charles Howard in GitHub issue 1161. --- diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c index acee11ccd78..f3622017830 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.118 2017/09/07 13:18:44 nicm Exp $ */ +/* $OpenBSD: cmd-set-option.c,v 1.119 2017/12/22 10:18:51 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -192,7 +192,9 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item) if (o == NULL) goto out; if (idx == -1) { - if (oo == global_options || + 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));