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:
parent
2cb39e838e
commit
8ac4ba4e0a
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue