This commit is contained in:
hrsh7th
2021-10-16 22:09:01 +09:00
parent ebe040b1a9
commit f0a6cca5b9
4 changed files with 14 additions and 9 deletions

View File

@@ -162,10 +162,9 @@ core.on_change = function(self, event)
self:autoindent(event, function()
local ctx = self:get_context({ reason = types.cmp.ContextReason.Auto })
debug.log(('ctx: `%s`'):format(ctx.cursor_before_line))
if ctx:changed(ctx.prev_context) then
self.view:redraw()
self.view:on_change()
debug.log('changed')
if vim.tbl_contains(config.get().completion.autocomplete or {}, event) then
@@ -262,6 +261,9 @@ core.filter = async.throttle(
if not misc.is_suitable_mode() then
return
end
if self.view:get_active_entry() ~= nil then
return
end
local ctx = self:get_context()
-- To wait for processing source for that's timeout.