Skip to content

Commit

Permalink
FIX(Saghen#725): inherit package.cpath in worker thread
Browse files Browse the repository at this point in the history
  • Loading branch information
leath-dub committed Dec 22, 2024
1 parent f93af0f commit 7fd06c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/blink/cmp/fuzzy/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ function fuzzy.access(item)

-- writing to the db takes ~10ms, so schedule writes in another thread
vim.uv
.new_work(function(itm) require('blink.cmp.fuzzy.rust').access(vim.mpack.decode(itm)) end, function() end)
:queue(vim.mpack.encode(item))
.new_work(function(itm, cpath)
package.cpath = cpath
require('blink.cmp.fuzzy.rust').access(vim.mpack.decode(itm))
end, function() end)
:queue(vim.mpack.encode(item), package.cpath)
end

---@param lines string
Expand Down

0 comments on commit 7fd06c6

Please sign in to comment.