mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-03 18:28:38 +00:00
fix(win): force-close any buffer that is not a file
This commit is contained in:
parent
ca233c7448
commit
dd50e53a9e
1 changed files with 1 additions and 1 deletions
|
@ -265,7 +265,7 @@ function M:close(opts)
|
|||
local buf = wipe and self.buf
|
||||
|
||||
-- never close modified buffers
|
||||
if buf and vim.bo[buf].modified then
|
||||
if buf and vim.bo[buf].modified and vim.bo[buf].buftype == "" then
|
||||
if not pcall(vim.api.nvim_buf_delete, buf, { force = false }) then
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue