Reactivate direct file change check on entering normal mode
This commit is contained in:
parent
4e02e822fd
commit
c0e4268e17
|
@ -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<YesNoAsk>();
|
||||
if (not (buffer.flags() & Buffer::Flags::File) or reload == No)
|
||||
|
|
|
@ -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.
|
||||
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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user