Work on select function

master
Bryan 2024-10-19 08:43:58 -06:00
parent 2164e73951
commit 45b47b0430
1 changed files with 5 additions and 5 deletions

View File

@ -31,9 +31,9 @@ local M = { ---@type Rabbit.Plugin
}, },
} }
local get_buffers = function(winid) local get_buffers = function()
M.listing.paths = {} M.listing.paths = {}
M.listing[winid] = {} M.listing[0] = {}
local bufs = vim.fn.getbufinfo({ buflisted = 1 }) local bufs = vim.fn.getbufinfo({ buflisted = 1 })
table.sort(bufs, function(a, b) table.sort(bufs, function(a, b)
@ -42,12 +42,12 @@ local get_buffers = function(winid)
for _, b in ipairs(bufs) do for _, b in ipairs(bufs) do
set.add(M.listing.paths, b.name) set.add(M.listing.paths, b.name)
set.add(M.listing[winid], b.name) set.add(M.listing[0], b.name)
end end
end end
function M.evt.RabbitEnter(_, winid) function M.evt.RabbitEnter()
get_buffers(winid) get_buffers()
end end
-- ---@param n integer -- ---@param n integer