From ce86597c3d0666a54696221ec0ff55ea3ec9b402 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Wed, 17 Aug 2022 21:13:12 +0530 Subject: [PATCH] utils: bufilter: Check for nil it will be empty if tabufline is disabled --- lua/core/utils.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index ed533f6..243664c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -175,7 +175,11 @@ M.packer_sync = function(...) end 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 if not vim.api.nvim_buf_is_valid(bufs[i]) then