diff --git a/src/commands.cc b/src/commands.cc index 596519ae..1bdef0ca 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -683,7 +683,7 @@ void exec_keys(const KeyList& keys, Context& context) int count = 0; Context new_context(batch_client); - new_context.change_editor(context.window()); + new_context.change_editor(context.editor()); while (batch_client.has_key_left()) { Key key = batch_client.get_key(); diff --git a/src/context.hh b/src/context.hh index f7bb5282..1107ac14 100644 --- a/src/context.hh +++ b/src/context.hh @@ -56,8 +56,6 @@ struct Context void change_editor(Editor& editor) { - if (has_client() and not dynamic_cast(&editor)) - throw logic_error(); m_editor.reset(&editor); } @@ -72,7 +70,7 @@ struct Context void draw_ifn() const { - if (has_client()) + if (has_client() and has_window()) client().draw_window(window()); }