fix(neotree): remove extra spacer, access root array

This commit is contained in:
əlemi 2024-09-07 03:37:51 +02:00
parent 89b75430e0
commit 1732f94add
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -96,7 +96,6 @@ M.update_state = function(state)
new_root("users"),
spacer(),
}
table.insert(root.children, spacer())
for i, path in ipairs(codemp.workspace:filetree()) do
table.insert(root[1].children, new_item(codemp.workspace.name, path))
end
@ -106,7 +105,7 @@ M.update_state = function(state)
elseif codemp.client ~= nil then
root = { new_root(codemp.client.username .. "@codemp") }
for _, ws in ipairs(codemp.available) do
table.insert(root.children, new_workspace(ws.name, ws.owned))
table.insert(root[1].children, new_workspace(ws.name, ws.owned))
end
else
root = { new_root("codemp") }