fix(neotree): make sure spacer ids dont repeat

This commit is contained in:
əlemi 2024-09-07 05:06:52 +02:00
parent 2fd15290b9
commit 3260fdf196
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -98,10 +98,13 @@ local function new_button(name)
}
end
local counter = 0;
---@return Item
local function spacer()
counter = counter + 1
return {
id = "codemp-ws-spacer-" .. vim.fn.rand() % 1024,
id = "codemp-ws-spacer-" .. counter,
name = "",
type = "spacer",
}