summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-06-14 20:51:01 +0000
committerMaxime Coste <frrrwww@gmail.com>2012-06-14 20:51:01 +0000
commitc8fdbc2a60dce38861a3145ee00938562ea0955c (patch)
treea0dcf92c7d969d1ed7c3a6d5ebfcc60f0748c71c /src
parent0e8add34ae137c8f314146c647baffc7e65290f9 (diff)
support buffer as a hook target
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 74f71820..488c892f 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -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