fix(bufdelete): opts.wipe. See #38

This commit is contained in:
Folke Lemaitre 2024-11-09 19:19:48 +01:00
parent d2f4f1937e
commit 0efbb93e0a
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -70,7 +70,7 @@ function M.delete(opts)
end)
end
if vim.api.nvim_buf_is_valid(buf) then
pcall(vim.cmd, opts.wipe and "bwipeout! " or "bdelete! " .. buf)
pcall(vim.cmd, (opts.wipe and "bwipeout! " or "bdelete! ") .. buf)
end
end)
end