From 05ebc4484f4c700b8cd1a8073759436940dcb96b Mon Sep 17 00:00:00 2001 From: Karl Liang Date: Sat, 27 Jan 2024 13:24:38 -0700 Subject: [PATCH 1/2] fix: filter out the unlisted buffers --- lua/sidebar-nvim/builtin/buffers.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/sidebar-nvim/builtin/buffers.lua b/lua/sidebar-nvim/builtin/buffers.lua index e70eeaf..8ef0d65 100644 --- a/lua/sidebar-nvim/builtin/buffers.lua +++ b/lua/sidebar-nvim/builtin/buffers.lua @@ -60,6 +60,10 @@ local function get_buffers(ctx) ignored = true end + if vim.bo[buffer].buflisted ~= true then + ignored = true + end + -- always ignore terminals if config.buffers.ignore_terminal and string.match(bufname, "term://.*") then ignored = true From 8febbc5032f12b34b048156b0a513b9fc896783b Mon Sep 17 00:00:00 2001 From: Karl Liang Date: Sat, 27 Jan 2024 14:23:03 -0700 Subject: [PATCH 2/2] fix: remove the syntax checking error --- lua/sidebar-nvim/builtin/buffers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/sidebar-nvim/builtin/buffers.lua b/lua/sidebar-nvim/builtin/buffers.lua index 8ef0d65..d9ad427 100644 --- a/lua/sidebar-nvim/builtin/buffers.lua +++ b/lua/sidebar-nvim/builtin/buffers.lua @@ -60,7 +60,7 @@ local function get_buffers(ctx) ignored = true end - if vim.bo[buffer].buflisted ~= true then + if vim.fn.buflisted(buffer) ~= 1 then ignored = true end