Skip to content

Commit

Permalink
fix: ignore nil item for resolve prefetching
Browse files Browse the repository at this point in the history
resolves #209
  • Loading branch information
Saghen committed Oct 29, 2024
1 parent f0f2672 commit b7d1233
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/blink/cmp/windows/autocomplete.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b7d1233

Please sign in to comment.