Return from delete_hidden_buffers when win type is command (#394)

* Return from delete_hidden_buffers when win type is command

* lint: apply stylua formatting

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
This commit is contained in:
csponge 2024-06-01 15:39:14 -04:00 committed by GitHub
parent 2cb39e838e
commit 8ac4ba4e0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -212,7 +212,12 @@ end
---Delete unmodified, hidden oil buffers and if none remain, clear the cache
M.delete_hidden_buffers = function()
local visible_buffers, hidden_buffers = get_visible_hidden_buffers()
if not visible_buffers or not hidden_buffers or not vim.tbl_isempty(visible_buffers) then
if
not visible_buffers
or not hidden_buffers
or not vim.tbl_isempty(visible_buffers)
or vim.fn.win_gettype() == "command"
then
return
end
for _, bufnr in ipairs(hidden_buffers) do