utils: bufilter: Check for nil
it will be empty if tabufline is disabled
This commit is contained in:
parent
d9cd55fc0f
commit
ce86597c3d
1 changed files with 5 additions and 1 deletions
|
@ -175,7 +175,11 @@ M.packer_sync = function(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
M.bufilter = function()
|
M.bufilter = function()
|
||||||
local bufs = vim.t.bufs
|
local bufs = vim.t.bufs or nil
|
||||||
|
|
||||||
|
if not bufs then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
for i = #bufs, 1, -1 do
|
for i = #bufs, 1, -1 do
|
||||||
if not vim.api.nvim_buf_is_valid(bufs[i]) then
|
if not vim.api.nvim_buf_is_valid(bufs[i]) then
|
||||||
|
|
Loading…
Reference in a new issue