From b3ba769220aad0a3ac2a969d43c58396b3753aa7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 14 Nov 2016 13:59:33 +0000 Subject: 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 --- src/buffer.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/buffer.cc') 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()); } -- cgit v1.2.3