Make window scope available to draft contexts

We do want window options/aliases/keymaps/hooks to be available in
draft context, dont we ?

Fixes #702
This commit is contained in:
Maxime Coste 2016-06-20 19:45:15 +01:00
parent fef37e6a92
commit 91bf0d4622

View File

@ -1448,6 +1448,10 @@ void context_wrap(const ParametersParser& parser, Context& context, Func func)
real_context->name());
Context& c = input_handler.context();
// Preserve window so that window scope is available
if (real_context->has_window())
c.set_window(real_context->window());
// We do not want this draft context to commit undo groups if the real one is
// going to commit the whole thing later
if (real_context->is_editing())