From edc2a503ee33e2a62e94a2257e9e3bbd50fa6feb Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Sun, 5 Dec 2021 18:22:03 +0900 Subject: [PATCH] Fix #610 --- lua/cmp/core.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lua/cmp/core.lua b/lua/cmp/core.lua index 38957bb..2df94f9 100644 --- a/lua/cmp/core.lua +++ b/lua/cmp/core.lua @@ -245,16 +245,20 @@ core.complete = function(self, ctx, source_configs) return end end - self.filter.timeout = self.view:visible() and THROTTLE_TIME or 0 - self:filter() + if not self.view:get_active_entry() then + self.filter.timeout = self.view:visible() and THROTTLE_TIME or 0 + self:filter() + end end end end)(s) s:complete(ctx, callback) end - self.filter.timeout = THROTTLE_TIME - self:filter() + if not self.view:get_active_entry() then + self.filter.timeout = THROTTLE_TIME + self:filter() + end end ---Update completion menu @@ -264,7 +268,6 @@ core.filter = async.throttle( local ignore = false ignore = ignore or not api.is_suitable_mode() - ignore = ignore or self.view:get_active_entry() if ignore then return end