summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-01-26 13:45:36 +1100
committerMaxime Coste <mawww@kakoune.org>2018-01-26 13:45:36 +1100
commitbf73cb0109b8b4ace7ebf95ab1b07eecfb5d7d8c (patch)
tree36056cd9194b7c60b995ff781b968085b4832336 /src
parent29a7cd3ab41a89a3e23f2ff74b79f239ac140fdb (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/client.cc3
1 files changed, 2 insertions, 1 deletions
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()