Clear up info/menus and eventual prompts when reseting to normal mode

Fixes #697
This commit is contained in:
Maxime Coste 2016-06-16 19:35:43 +01:00
parent 04d24b22bd
commit 34c8e6a9cf
3 changed files with 7 additions and 1 deletions

View File

@ -287,7 +287,7 @@ void Client::close_buffer_reload_dialog()
{ {
kak_assert(m_buffer_reload_dialog_opened); kak_assert(m_buffer_reload_dialog_opened);
m_buffer_reload_dialog_opened = false; m_buffer_reload_dialog_opened = false;
m_ui->info_hide(); info_hide();
m_input_handler.reset_normal_mode(); m_input_handler.reset_normal_mode();
} }

View File

@ -150,9 +150,14 @@ void Context::change_buffer(Buffer& buffer)
m_window.reset(); m_window.reset();
if (has_client()) if (has_client())
{
client().change_buffer(buffer); client().change_buffer(buffer);
client().info_hide();
client().menu_hide();
}
else else
m_selections = SelectionList{buffer, Selection{}}; m_selections = SelectionList{buffer, Selection{}};
if (has_input_handler()) if (has_input_handler())
input_handler().reset_normal_mode(); input_handler().reset_normal_mode();
} }

View File

@ -883,6 +883,7 @@ private:
} }
void on_enabled() override { display(); } void on_enabled() override { display(); }
void on_disabled() override { context().print_status({}); }
PromptCallback m_callback; PromptCallback m_callback;
Completer m_completer; Completer m_completer;