Fix file change detection not working in certain cases

Files opened from the command line where not handled correctly.
This commit is contained in:
Maxime Coste 2015-10-13 19:31:24 +01:00
parent 49557f5b17
commit 572cf9d6b2

View File

@ -168,11 +168,9 @@ public:
void on_enabled() override void on_enabled() override
{ {
if (context().has_client()) if (context().has_client())
{
context().client().check_if_buffer_needs_reloading(); context().client().check_if_buffer_needs_reloading();
m_fs_check_timer.set_next_date(Clock::now() + fs_check_timeout);
}
m_fs_check_timer.set_next_date(Clock::now() + fs_check_timeout);
m_idle_timer.set_next_date(Clock::now() + idle_timeout); m_idle_timer.set_next_date(Clock::now() + idle_timeout);
context().hooks().run_hook("NormalBegin", "", context()); context().hooks().run_hook("NormalBegin", "", context());
@ -1237,6 +1235,7 @@ InputHandler::InputHandler(SelectionList selections, Context::Flags flags, Strin
: m_context(*this, std::move(selections), flags, std::move(name)) : m_context(*this, std::move(selections), flags, std::move(name))
{ {
m_mode_stack.emplace_back(new InputModes::Normal(*this)); m_mode_stack.emplace_back(new InputModes::Normal(*this));
current_mode().on_enabled();
} }
InputHandler::~InputHandler() InputHandler::~InputHandler()