summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/context.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/context.hh b/src/context.hh
index 079847f2..176df273 100644
--- a/src/context.hh
+++ b/src/context.hh
@@ -88,6 +88,15 @@ struct Context
return GlobalOptions::instance();
}
+ HookManager& hooks() const
+ {
+ if (has_window())
+ return window().hooks();
+ if (has_buffer())
+ return buffer().hooks();
+ return GlobalHooks::instance();
+ }
+
void print_status(const String& status) const
{
if (has_ui())