fix(picker.finder): tmp fix for #2386
Some checks are pending
CI / ci (push) Waiting to run

This commit is contained in:
Folke Lemaitre 2025-10-29 19:28:41 +01:00
parent 8afb609333
commit 5eea5f9428
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -147,9 +147,10 @@ function M.multi(opts)
local finder = M.finder(source.finder)
finders[#finders + 1] = function(fopts, ctx)
fopts = Snacks.config.merge({}, vim.deepcopy(source), fopts)
ctx = setmetatable({}, { __index = ctx })
ctx._opts = fopts
-- Update source filter when needed
if not vim.tbl_isempty(fopts.filter or {}) then
ctx = setmetatable({}, { __index = ctx })
ctx.filter = ctx.filter:clone():init(fopts)
end
return finder(fopts, ctx)