mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker.undo): cleanup tmp buffer
This commit is contained in:
parent
033db250cd
commit
8368176243
1 changed files with 3 additions and 3 deletions
|
@ -447,13 +447,13 @@ function M.undo(opts, ctx)
|
|||
local item = table.remove(items, 1)
|
||||
Snacks.picker.util.resolve(item)
|
||||
end
|
||||
if #items == 0 then
|
||||
vim.api.nvim_buf_delete(tmpbuf, { force = true })
|
||||
end
|
||||
ctx.async:resume()
|
||||
end)
|
||||
ctx.async:suspend()
|
||||
end
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_buf_delete(tmpbuf, { force = true })
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue