feat(picker.projects): allow disabling projects from recent files

This commit is contained in:
Folke Lemaitre 2025-02-02 16:37:22 +01:00
parent 9f03de4fda
commit c2dedb647f
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 7 additions and 3 deletions

View file

@ -94,9 +94,11 @@ function M.projects(opts, ctx)
end
end
for file in oldfiles(ctx.filter) do
local dir = Snacks.git.get_root(file)
add(dir)
if opts.recent then
for file in oldfiles(ctx.filter) do
local dir = Snacks.git.get_root(file)
add(dir)
end
end
---@async