summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-04-30 18:02:04 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-04-30 18:02:04 +0000
commit3bb7df37ddee0d3297d98e3c7bfaae70adc59fae (patch)
tree78c70fc55989ac5d7c2d3afcfb18b8d1ab49db2d /usr.bin
parentd3aa0d760e1ed38557b0c9da42407fc9ad97d828 (diff)
Fix user options after show-hooks merge, GitHub issue 1704.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/cmd-show-options.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/usr.bin/tmux/cmd-show-options.c b/usr.bin/tmux/cmd-show-options.c
index a4daac6cb02..8d053ba51f0 100644
--- a/usr.bin/tmux/cmd-show-options.c
+++ b/usr.bin/tmux/cmd-show-options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-options.c,v 1.48 2019/04/26 11:38:51 nicm Exp $ */
+/* $OpenBSD: cmd-show-options.c,v 1.49 2019/04/30 18:02:03 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -216,19 +216,21 @@ static enum cmd_retval
cmd_show_options_all(struct cmd *self, struct cmdq_item *item,
struct options *oo)
{
- struct options_entry *o;
- struct options_array_item *a;
- u_int idx;
- int flags;
+ struct options_entry *o;
+ struct options_array_item *a;
+ u_int idx;
+ const struct options_table_entry *oe;
o = options_first(oo);
while (o != NULL) {
- flags = options_table_entry(o)->flags;
+ oe = options_table_entry(o);
if ((self->entry != &cmd_show_hooks_entry &&
!args_has(self->args, 'H') &&
- (flags & OPTIONS_TABLE_IS_HOOK)) ||
+ oe != NULL &&
+ (oe->flags & OPTIONS_TABLE_IS_HOOK)) ||
(self->entry == &cmd_show_hooks_entry &&
- (~flags & OPTIONS_TABLE_IS_HOOK))) {
+ (oe == NULL ||
+ (~oe->flags & OPTIONS_TABLE_IS_HOOK)))) {
o = options_next(o);
continue;
}