fix(picker.undo): cleanup tmp buffer

This commit is contained in:
Folke Lemaitre 2025-02-02 09:37:59 +01:00
parent 033db250cd
commit 8368176243
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -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