From 691a6328b1ae96d09b33f395a67a90dc9a743fa8 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 8 Aug 2012 19:37:04 +0200 Subject: [PATCH] exec_keys: use the context editor, no need for a new one --- src/commands.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/commands.cc b/src/commands.cc index 38dc1225..54f56ee3 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -669,11 +669,7 @@ void exec_keys(const KeyList& keys, Context& context) RegisterRestorer quote('"', context); RegisterRestorer slash('/', context); - Editor batch_editor(context.buffer()); - Editor& editor = context.has_window() ? static_cast(context.window()) - : static_cast(batch_editor); - - scoped_edition edition(editor); + scoped_edition edition(context.editor()); int count = 0; Context new_context(context);