diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-11-14 13:59:33 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-11-14 19:39:35 +0000 |
| commit | b3ba769220aad0a3ac2a969d43c58396b3753aa7 (patch) | |
| tree | fb01b5f5e8cd5260ea23aff309bcdcf9ba017f94 /src/buffer.cc | |
| parent | cb074793a0af099754a7fba9c2a5755bd2130d31 (diff) | |
Propagate the hooks disabled state through prompt, menu, and command execution
Maintain it as well during buffer creation even if the hooks are not executed
in client context.
Fixes #818
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index a0a66fd8..fddf473e 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -710,6 +710,9 @@ void Buffer::on_option_changed(const Option& option) void Buffer::run_hook_in_own_context(StringView hook_name, StringView param) { + if (m_flags & Buffer::Flags::NoHooks) + return; + InputHandler hook_handler({ *this, Selection{} }, Context::Flags::Transient); hooks().run_hook(hook_name, param, hook_handler.context()); } |
