summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2015-11-24 09:34:55 +0000
committernicm <nicm>2015-11-24 09:34:55 +0000
commitb32ce34cf2b5e48eab4f626f378d50f365b594a3 (patch)
tree68e20a595a86f22211e35d21c3b141d029562a0e
parent2adf3f42ee451b30ef492229dac322808f93d8dc (diff)
Don't allow options in table without scope set.
-rw-r--r--options-table.c2
-rw-r--r--tmux.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/options-table.c b/options-table.c
index dc4922ba..0dab0c0e 100644
--- a/options-table.c
+++ b/options-table.c
@@ -892,6 +892,8 @@ options_table_populate_tree(enum options_table_scope scope, struct options *oo)
const struct options_table_entry *oe;
for (oe = options_table; oe->name != NULL; oe++) {
+ if (oe->scope == OPTIONS_TABLE_NONE)
+ fatalx("no scope for %s", oe->name);
if (oe->scope != scope)
continue;
switch (oe->type) {
diff --git a/tmux.h b/tmux.h
index a112e7df..591fe54e 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1394,6 +1394,7 @@ enum options_table_type {
OPTIONS_TABLE_STYLE
};
enum options_table_scope {
+ OPTIONS_TABLE_NONE,
OPTIONS_TABLE_SERVER,
OPTIONS_TABLE_SESSION,
OPTIONS_TABLE_WINDOW,