diff --git a/src/client.cc b/src/client.cc index 97ceb632..74a9aff2 100644 --- a/src/client.cc +++ b/src/client.cc @@ -222,6 +222,9 @@ void Client::close_buffer_reload_dialog() void Client::check_if_buffer_needs_reloading() { + if (m_buffer_reload_dialog_opened) + return; + Buffer& buffer = context().buffer(); auto reload = context().options()["autoreload"].get(); if (not (buffer.flags() & Buffer::Flags::File) or reload == No) diff --git a/src/input_handler.cc b/src/input_handler.cc index 499778e8..6edc61b5 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -71,11 +71,11 @@ public: void on_enabled() override { - if (not context().has_client()) - return; - // Do not check buffer timestamp, we might already be executing the - // on next key of a buffer timestamp check. - m_fs_check_timer.set_next_date(Clock::now() + fs_check_timeout); + if (context().has_client()) + { + context().client().check_if_buffer_needs_reloading(); + m_fs_check_timer.set_next_date(Clock::now() + fs_check_timeout); + } context().hooks().run_hook("NormalBegin", "", context()); }