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()
|
void Client::check_if_buffer_needs_reloading()
|
||||||
{
|
{
|
||||||
|
if (m_buffer_reload_dialog_opened)
|
||||||
|
return;
|
||||||
|
|
||||||
Buffer& buffer = context().buffer();
|
Buffer& buffer = context().buffer();
|
||||||
auto reload = context().options()["autoreload"].get<YesNoAsk>();
|
auto reload = context().options()["autoreload"].get<YesNoAsk>();
|
||||||
if (not (buffer.flags() & Buffer::Flags::File) or reload == No)
|
if (not (buffer.flags() & Buffer::Flags::File) or reload == No)
|
||||||
|
|
|
@ -71,11 +71,11 @@ public:
|
||||||
|
|
||||||
void on_enabled() override
|
void on_enabled() override
|
||||||
{
|
{
|
||||||
if (not context().has_client())
|
if (context().has_client())
|
||||||
return;
|
{
|
||||||
// Do not check buffer timestamp, we might already be executing the
|
context().client().check_if_buffer_needs_reloading();
|
||||||
// on next key of a buffer timestamp check.
|
|
||||||
m_fs_check_timer.set_next_date(Clock::now() + fs_check_timeout);
|
m_fs_check_timer.set_next_date(Clock::now() + fs_check_timeout);
|
||||||
|
}
|
||||||
|
|
||||||
context().hooks().run_hook("NormalBegin", "", context());
|
context().hooks().run_hook("NormalBegin", "", context());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user