mirror of
https://github.com/tmux/tmux.git
synced 2025-01-15 05:09:04 +00:00
Don't allow options in table without scope set.
This commit is contained in:
parent
2adf3f42ee
commit
b32ce34cf2
@ -892,6 +892,8 @@ options_table_populate_tree(enum options_table_scope scope, struct options *oo)
|
|||||||
const struct options_table_entry *oe;
|
const struct options_table_entry *oe;
|
||||||
|
|
||||||
for (oe = options_table; oe->name != NULL; 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)
|
if (oe->scope != scope)
|
||||||
continue;
|
continue;
|
||||||
switch (oe->type) {
|
switch (oe->type) {
|
||||||
|
1
tmux.h
1
tmux.h
@ -1394,6 +1394,7 @@ enum options_table_type {
|
|||||||
OPTIONS_TABLE_STYLE
|
OPTIONS_TABLE_STYLE
|
||||||
};
|
};
|
||||||
enum options_table_scope {
|
enum options_table_scope {
|
||||||
|
OPTIONS_TABLE_NONE,
|
||||||
OPTIONS_TABLE_SERVER,
|
OPTIONS_TABLE_SERVER,
|
||||||
OPTIONS_TABLE_SESSION,
|
OPTIONS_TABLE_SESSION,
|
||||||
OPTIONS_TABLE_WINDOW,
|
OPTIONS_TABLE_WINDOW,
|
||||||
|
Loading…
Reference in New Issue
Block a user