From 91bf0d4622181c2faff621feb6241204eefa09b8 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 20 Jun 2016 19:45:15 +0100 Subject: [PATCH] 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 --- src/commands.cc | 4 ++++ 1 file changed, 4 insertions(+) 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())