1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-27 05:33:17 +03:00

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_disable_hooks{context().hooks_disabled(), context().hooks_disabled()},
m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Draft ? m_idle_timer{TimePoint::max(), context().flags() & Context::Flags::Draft ?
Timer::Callback{} : [this](Timer&) { Timer::Callback{} : [this](Timer&) {
if (m_auto_complete) m_completer.update(m_auto_complete);
m_completer.update();
context().hooks().run_hook("InsertIdle", "", context()); 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)) if (m_explicit_completer and try_complete(m_explicit_completer))
return; return;
reset(); reset();
setup_ifn(); if (allow_implicit)
setup_ifn();
} }
void InsertCompleter::reset() void InsertCompleter::reset()

View File

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