From 73cfdd7367d98003246eb05d09edf414828288a7 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 27 Jun 2022 20:11:20 +0530 Subject: [PATCH] remove buf_loaded check As this causes issues (buf switching i.e tbufbnext/tbufprev) not working properly when nvim is opened with multiple files https://github.com/NvChad/NvChad/commit/dbb34399828eef32cc65d9dcad3c41119a5e9d65#commitcomment-77092312 --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 075f976..6dd1f8c 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -199,7 +199,7 @@ M.bufilter = function() local bufs = vim.t.bufs for i = #bufs, 1, -1 do - if not vim.api.nvim_buf_is_loaded(bufs[i]) then + if not vim.api.nvim_buf_is_valid(bufs[i]) then table.remove(bufs, i) end end