mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 03:08:13 +00:00
fix(explorer): clear cache after action. Fixes #890
This commit is contained in:
parent
10cda46798
commit
34097ff37e
1 changed files with 6 additions and 6 deletions
|
@ -471,7 +471,7 @@ M.actions = {
|
||||||
end
|
end
|
||||||
io.open(path, "w"):close()
|
io.open(path, "w"):close()
|
||||||
end
|
end
|
||||||
state:update()
|
state:update({ force = true })
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
explorer_rename = function(picker, item)
|
explorer_rename = function(picker, item)
|
||||||
|
@ -483,7 +483,7 @@ M.actions = {
|
||||||
file = item.file,
|
file = item.file,
|
||||||
on_rename = function(new)
|
on_rename = function(new)
|
||||||
state:open(new)
|
state:open(new)
|
||||||
state:update()
|
state:update({ force = true })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
@ -535,7 +535,7 @@ M.actions = {
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
picker.list:set_selected() -- clear selection
|
picker.list:set_selected() -- clear selection
|
||||||
state:update()
|
state:update({ force = true })
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
explorer_copy = function(picker, item)
|
explorer_copy = function(picker, item)
|
||||||
|
@ -551,7 +551,7 @@ M.actions = {
|
||||||
Snacks.picker.util.copy(paths, dir)
|
Snacks.picker.util.copy(paths, dir)
|
||||||
state:open(dir)
|
state:open(dir)
|
||||||
picker.list:set_selected() -- clear selection
|
picker.list:set_selected() -- clear selection
|
||||||
state:update()
|
state:update({ force = true })
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
Snacks.input({
|
Snacks.input({
|
||||||
|
@ -568,7 +568,7 @@ M.actions = {
|
||||||
end
|
end
|
||||||
Snacks.picker.util.copy_path(item.file, to)
|
Snacks.picker.util.copy_path(item.file, to)
|
||||||
state:open(dir)
|
state:open(dir)
|
||||||
state:update()
|
state:update({ force = true })
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
explorer_del = function(picker)
|
explorer_del = function(picker)
|
||||||
|
@ -586,7 +586,7 @@ M.actions = {
|
||||||
Snacks.notify.error("Failed to delete `" .. path .. "`:\n- " .. err)
|
Snacks.notify.error("Failed to delete `" .. path .. "`:\n- " .. err)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
state:update()
|
state:update({ force = true })
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
explorer_focus = function(picker)
|
explorer_focus = function(picker)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue