From 9cbe9675ea8a8efb01dcc5f267e6d5853b2cd58f Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 13 Apr 2020 07:25:33 +0000 Subject: 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. --- notify.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'notify.c') diff --git a/notify.c b/notify.c index c91a4399..772b3e1f 100644 --- a/notify.c +++ b/notify.c @@ -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; -- cgit v1.2.3