fix(builtin.pickers): fix wrong picker resuming when using filtering (#2682)
When filtering is applied, `picker:get_index(picker:get_selection_row())` returns index relative to the filtered entry list rather than the original full results. This causes inaccurate indexing into the `cache_pickers` table.
This commit is contained in:
committed by
GitHub
parent
dc7f25c810
commit
74be3c3bba
@@ -559,4 +559,12 @@ utils.__git_command = function(args, opts)
|
||||
return vim.list_extend(_args, args)
|
||||
end
|
||||
|
||||
utils.list_find = function(func, list)
|
||||
for i, v in ipairs(list) do
|
||||
if func(v, i, list) then
|
||||
return i, v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return utils
|
||||
|
||||
Reference in New Issue
Block a user