From 91c3da0b4b286967d6d0166c0fc5769795a78918 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 25 Feb 2025 14:29:36 +0100 Subject: [PATCH] fix(picker.buffers): add `a` flag when buffer is visible in a window. See #1417 --- lua/snacks/picker/source/buffers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/snacks/picker/source/buffers.lua b/lua/snacks/picker/source/buffers.lua index 2b6d1b39..95a96712 100644 --- a/lua/snacks/picker/source/buffers.lua +++ b/lua/snacks/picker/source/buffers.lua @@ -28,7 +28,7 @@ function M.buffers(opts, ctx) local mark = vim.api.nvim_buf_get_mark(buf, '"') local flags = { buf == current_buf and "%" or (buf == alternate_buf and "#" or ""), - info.hidden == 1 and "h" or "a", + info.hidden == 1 and "h" or (#(info.windows or {}) > 0) and "a" or "", vim.bo[buf].readonly and "=" or "", info.changed == 1 and "+" or "", }