diff --git a/lua/blink/cmp/windows/autocomplete.lua b/lua/blink/cmp/windows/autocomplete.lua index 922471fd..697d18f8 100644 --- a/lua/blink/cmp/windows/autocomplete.lua +++ b/lua/blink/cmp/windows/autocomplete.lua @@ -65,6 +65,8 @@ function autocomplete.setup() local last_request = nil local timer = vim.uv.new_timer() autocomplete.listen_on_select(function(item, context) + if not item then return end + local resolve = vim.schedule_wrap(function() if last_request ~= nil then last_request:cancel() end last_request = require('blink.cmp.sources.lib').resolve(item)