From f32fccd24ff67b432898aac196ad48f436be341e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 22 Dec 2017 10:18:52 +0000 Subject: Do not try to set default value on user options (they don't have one), from Charles Howard in GitHub issue 1161. --- usr.bin/tmux/cmd-set-option.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux') 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)); -- cgit v1.2.3