Context: add a hooks method similar to the options one

This commit is contained in:
Maxime Coste 2013-01-14 19:26:44 +01:00
parent a1998dac7a
commit 12ce590f18

View File

@ -88,6 +88,15 @@ struct Context
return GlobalOptions::instance(); 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 void print_status(const String& status) const
{ {
if (has_ui()) if (has_ui())