Fix manual insert completion menu not getting automatically hidden

Fixes #2208
This commit is contained in:
Maxime Coste 2018-07-15 11:46:02 +10:00
parent d23ac09fc1
commit c58457a3c0
3 changed files with 5 additions and 5 deletions

View File

@ -1096,8 +1096,7 @@ public:
m_disable_hooks{context().hooks_disabled(), context().hooks_disabled()},
m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Draft ?
Timer::Callback{} : [this](Timer&) {
if (m_auto_complete)
m_completer.update();
m_completer.update(m_auto_complete);
context().hooks().run_hook("InsertIdle", "", context());
}}
{

View File

@ -459,13 +459,14 @@ void InsertCompleter::select(int index, bool relative, Vector<Key>& keystrokes)
}
}
void InsertCompleter::update()
void InsertCompleter::update(bool allow_implicit)
{
if (m_explicit_completer and try_complete(m_explicit_completer))
return;
reset();
setup_ifn();
if (allow_implicit)
setup_ifn();
}
void InsertCompleter::reset()

View File

@ -83,7 +83,7 @@ public:
~InsertCompleter();
void select(int index, bool relative, Vector<Key>& keystrokes);
void update();
void update(bool allow_implicit);
void reset();
void explicit_file_complete();