summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-11-14 13:59:33 +0000
committerMaxime Coste <frrrwww@gmail.com>2016-11-14 19:39:35 +0000
commitb3ba769220aad0a3ac2a969d43c58396b3753aa7 (patch)
treefb01b5f5e8cd5260ea23aff309bcdcf9ba017f94 /src/normal.cc
parentcb074793a0af099754a7fba9c2a5755bd2130d31 (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/normal.cc')
-rw-r--r--src/normal.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 8e2e0936..1b420faa 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -201,7 +201,12 @@ void goto_commands(Context& context, NormalParams params)
Buffer* buffer = BufferManager::instance().get_buffer_ifp(path);
if (not buffer)
- buffer = open_file_buffer(path);
+ {
+ buffer = open_file_buffer(path, context.hooks_disabled() ?
+ Buffer::Flags::NoHooks
+ : Buffer::Flags::None);
+ buffer->flags() &= ~Buffer::Flags::NoHooks;
+ }
if (buffer != &context.buffer())
{