mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 09:18:51 +02:00
fix(util): use bdelete
for buf remove
This commit is contained in:
parent
c8b7912eb9
commit
19674e8047
1 changed files with 3 additions and 1 deletions
|
@ -246,7 +246,9 @@ function M.bufremove(buf)
|
|||
vim.api.nvim_win_set_buf(win, new_buf)
|
||||
end)
|
||||
end
|
||||
vim.api.nvim_buf_delete(buf, { force = true })
|
||||
if vim.api.nvim_buf_is_valid(buf) then
|
||||
pcall(vim.cmd, "bdelete! " .. buf)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue