Disable history in :exec and :eval

This commit is contained in:
Maxime Coste 2015-04-21 13:45:10 +01:00
parent 4bb1e0a878
commit 7824a76e1a

View File

@ -1168,6 +1168,7 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
// Propagate user hooks disabled status to the temporary context // Propagate user hooks disabled status to the temporary context
ScopedDisable hook_disable(c.user_hooks_support(), disable_hooks); ScopedDisable hook_disable(c.user_hooks_support(), disable_hooks);
ScopedDisable keymaps_disable(c.keymaps_support(), disable_keymaps); ScopedDisable keymaps_disable(c.keymaps_support(), disable_keymaps);
ScopedDisable disable_history{c.history_support()};
func(parser, c); func(parser, c);
}; };
@ -1203,6 +1204,7 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
ScopedDisable hook_disable(c.user_hooks_support(), disable_hooks); ScopedDisable hook_disable(c.user_hooks_support(), disable_hooks);
ScopedDisable keymaps_disable(c.keymaps_support(), disable_keymaps); ScopedDisable keymaps_disable(c.keymaps_support(), disable_keymaps);
ScopedDisable disable_history{c.history_support()};
if (parser.get_switch("itersel")) if (parser.get_switch("itersel"))
{ {
@ -1229,6 +1231,7 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
ScopedDisable hook_disable(real_context->user_hooks_support(), disable_hooks); ScopedDisable hook_disable(real_context->user_hooks_support(), disable_hooks);
ScopedDisable keymaps_disable(real_context->keymaps_support(), disable_keymaps); ScopedDisable keymaps_disable(real_context->keymaps_support(), disable_keymaps);
ScopedDisable disable_history{real_context->history_support()};
func(parser, *real_context); func(parser, *real_context);
} }