From bf73cb0109b8b4ace7ebf95ab1b07eecfb5d7d8c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 26 Jan 2018 13:45:36 +1100 Subject: [PATCH] Reset normal mode before hiding the reload buffer info box Reseting normal mode will enable normal mode, which will trigger a check for buffer modification. We do not want that check to happen as we are trying to close the info box. Doing that mode reset first will prevent the check from happening (as the info box is already displayed), and will correctly hide it afterwards. Fixes #1809 --- src/client.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client.cc b/src/client.cc index 0a699acd..b2199194 100644 --- a/src/client.cc +++ b/src/client.cc @@ -311,9 +311,10 @@ void Client::on_buffer_reload_key(Key key) void Client::close_buffer_reload_dialog() { kak_assert(m_buffer_reload_dialog_opened); + // Reset first as this might check for reloading. + m_input_handler.reset_normal_mode(); m_buffer_reload_dialog_opened = false; info_hide(true); - m_input_handler.reset_normal_mode(); } void Client::check_if_buffer_needs_reloading()