Context: add a hooks method similar to the options one
This commit is contained in:
parent
a1998dac7a
commit
12ce590f18
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue
Block a user