From 34c8e6a9cf15410a433c8a8c3901703708b85611 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 16 Jun 2016 19:35:43 +0100 Subject: [PATCH] Clear up info/menus and eventual prompts when reseting to normal mode Fixes #697 --- src/client.cc | 2 +- src/context.cc | 5 +++++ src/input_handler.cc | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client.cc b/src/client.cc index cc42c7fd..0211c81b 100644 --- a/src/client.cc +++ b/src/client.cc @@ -287,7 +287,7 @@ void Client::close_buffer_reload_dialog() { kak_assert(m_buffer_reload_dialog_opened); m_buffer_reload_dialog_opened = false; - m_ui->info_hide(); + info_hide(); m_input_handler.reset_normal_mode(); } diff --git a/src/context.cc b/src/context.cc index a79f7790..5e16682d 100644 --- a/src/context.cc +++ b/src/context.cc @@ -150,9 +150,14 @@ void Context::change_buffer(Buffer& buffer) m_window.reset(); if (has_client()) + { client().change_buffer(buffer); + client().info_hide(); + client().menu_hide(); + } else m_selections = SelectionList{buffer, Selection{}}; + if (has_input_handler()) input_handler().reset_normal_mode(); } diff --git a/src/input_handler.cc b/src/input_handler.cc index 63cee710..15b01a05 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -883,6 +883,7 @@ private: } void on_enabled() override { display(); } + void on_disabled() override { context().print_status({}); } PromptCallback m_callback; Completer m_completer;