mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
fix(neotree): make sure spacer ids dont repeat
This commit is contained in:
parent
2fd15290b9
commit
3260fdf196
1 changed files with 4 additions and 1 deletions
|
@ -98,10 +98,13 @@ local function new_button(name)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local counter = 0;
|
||||||
|
|
||||||
---@return Item
|
---@return Item
|
||||||
local function spacer()
|
local function spacer()
|
||||||
|
counter = counter + 1
|
||||||
return {
|
return {
|
||||||
id = "codemp-ws-spacer-" .. vim.fn.rand() % 1024,
|
id = "codemp-ws-spacer-" .. counter,
|
||||||
name = "",
|
name = "",
|
||||||
type = "spacer",
|
type = "spacer",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue