diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-01-18 08:40:51 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-01-18 08:40:51 +0000 |
commit | dfabb8445505aea0b6df6ea613920f7669fc61e7 (patch) | |
tree | 4e10f0b001f2663ff14b005f771c4e38d3f056f4 /usr.bin/tmux/options.c | |
parent | fe60d8c08aa9ffc18f3dd54b0eae9bba40049f18 (diff) |
options_match needs to explicitly check for user options.
Diffstat (limited to 'usr.bin/tmux/options.c')
-rw-r--r-- | usr.bin/tmux/options.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/options.c b/usr.bin/tmux/options.c index a70db4e9201..9abee080e6a 100644 --- a/usr.bin/tmux/options.c +++ b/usr.bin/tmux/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.28 2017/01/16 23:45:08 nicm Exp $ */ +/* $OpenBSD: options.c,v 1.29 2017/01/18 08:40:50 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -403,6 +403,12 @@ options_match(const char *s, int *idx, int* ambiguous) name = options_parse(s, idx); namelen = strlen(name); + *idx = -1; + if (*name == '@') { + *ambiguous = 0; + return (xstrdup(name)); + } + found = NULL; for (oe = options_table; oe->name != NULL; oe++) { if (strcmp(oe->name, name) == 0) { |