mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker.actions): take into account if source is recent
explicitly
This commit is contained in:
parent
bc0630e43b
commit
97167483e7
1 changed files with 17 additions and 6 deletions
|
@ -266,12 +266,23 @@ function M.picker(picker, item, action)
|
|||
for _, p in ipairs(Snacks.picker.get({ source = source })) do
|
||||
p:close()
|
||||
end
|
||||
Snacks.picker(source, {
|
||||
cwd = Snacks.picker.util.dir(item),
|
||||
on_show = function()
|
||||
picker:close()
|
||||
end,
|
||||
})
|
||||
if source == "recent" then
|
||||
Snacks.picker(source, {
|
||||
filter = {
|
||||
cwd = Snacks.picker.util.dir(item),
|
||||
},
|
||||
on_show = function()
|
||||
picker:close()
|
||||
end,
|
||||
})
|
||||
else
|
||||
Snacks.picker(source, {
|
||||
cwd = Snacks.picker.util.dir(item),
|
||||
on_show = function()
|
||||
picker:close()
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
M.picker_files = { action = "picker", source = "files" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue