summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc3
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());
}