diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-01-14 19:26:44 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-01-14 19:26:44 +0100 |
| commit | 12ce590f186e025890011fec185489eb5cccf3dd (patch) | |
| tree | bf51721cfb3875b9ff5bf6b5940ed4f150560ebf /src/context.hh | |
| parent | a1998dac7a0766202a953e137dd3ea061414a20f (diff) | |
Context: add a hooks method similar to the options one
Diffstat (limited to 'src/context.hh')
| -rw-r--r-- | src/context.hh | 9 |
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()) |
