Change so that the appropriate hooks for windows and panes belong to

pane/window options rather than all being session options. This is
useful for example to create a pane that is automatically closed on some
condition. From Anindya Mukherjee.
This commit is contained in:
nicm
2020-04-13 07:25:33 +00:00
parent ad38ef6ff4
commit 9cbe9675ea
5 changed files with 54 additions and 37 deletions

View File

@ -76,6 +76,14 @@ notify_insert_hook(struct cmdq_item *item, struct notify_entry *ne)
else
oo = fs.s->options;
o = options_get(oo, ne->name);
if (o == NULL && fs.wp != NULL) {
oo = fs.wp->options;
o = options_get(oo, ne->name);
}
if (o == NULL && fs.wl != NULL) {
oo = fs.wl->window->options;
o = options_get(oo, ne->name);
}
if (o == NULL)
return;