mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-24 13:31:06 +00: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)
|
vim.api.nvim_win_set_buf(win, new_buf)
|
||||||
end)
|
end)
|
||||||
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
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue