Reset normal mode when changing the current editor
This commit is contained in:
parent
608196f526
commit
fe0a4f0d11
|
@ -937,7 +937,7 @@ private:
|
|||
|
||||
InputMode& InputMode::reset_normal_mode()
|
||||
{
|
||||
m_client.change_input_mode(new InputModes::Normal(m_client));
|
||||
m_client.reset_normal_mode();
|
||||
return *m_client.m_mode;
|
||||
}
|
||||
|
||||
|
@ -1090,4 +1090,9 @@ void Client::redraw_ifn()
|
|||
}
|
||||
}
|
||||
|
||||
void Client::reset_normal_mode()
|
||||
{
|
||||
change_input_mode(new InputModes::Normal(*this));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -85,6 +85,8 @@ public:
|
|||
void redraw_ifn();
|
||||
|
||||
UserInterface& ui() const { return *m_ui; }
|
||||
|
||||
void reset_normal_mode();
|
||||
private:
|
||||
void change_input_mode(InputMode* new_mode);
|
||||
|
||||
|
|
|
@ -153,6 +153,8 @@ void Context::change_editor(Editor& editor)
|
|||
window().set_dimensions(ui().dimensions());
|
||||
window().hooks().run_hook("WinDisplay", buffer().name(), *this);
|
||||
}
|
||||
if (has_client())
|
||||
client().reset_normal_mode();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user