summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-06-20 19:45:15 +0100
committerMaxime Coste <frrrwww@gmail.com>2016-06-20 19:45:15 +0100
commit91bf0d4622181c2faff621feb6241204eefa09b8 (patch)
treee60c308f8c25550f7ae0fe9f7a273a5eeb0ff8e0 /src
parentfef37e6a92b3ad0b438e0e40c575ccdeaf37d54c (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 5070aa9a..e0019777 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -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())