support buffer as a hook target

This commit is contained in:
Maxime Coste 2012-06-14 20:51:01 +00:00
parent 0e8add34ae
commit c8fdbc2a60

View File

@ -458,6 +458,8 @@ void add_hook(const CommandParameters& params, const Context& context)
if (params[0] == "global")
GlobalHookManager::instance().add_hook(params[1], hook_func);
else if (params[0] == "buffer")
context.buffer().hook_manager().add_hook(params[1], hook_func);
else if (params[0] == "window")
context.window().hook_manager().add_hook(params[1], hook_func);
else