exec_keys: use the context editor, no need for a new one

This commit is contained in:
Maxime Coste 2012-08-08 19:37:04 +02:00
parent ce99856bfa
commit 691a6328b1

View File

@ -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<Editor&>(context.window())
: static_cast<Editor&>(batch_editor);
scoped_edition edition(editor);
scoped_edition edition(context.editor());
int count = 0;
Context new_context(context);