refacto: tree explorer root should be absolute_path not cwd

This commit is contained in:
kiyan
2022-05-29 11:40:06 +02:00
parent 3806653d75
commit 5e900c2f29
9 changed files with 12 additions and 12 deletions

View File

@@ -33,7 +33,7 @@ function M.parent_node(should_close)
local parent = node.parent
if not parent or parent.cwd then
if not parent or not parent.parent then
return view.set_cursor { 1, 0 }
end

View File

@@ -18,7 +18,7 @@ local function refresh_nodes(node, projects)
end
function M.reload_node_status(parent_node, projects)
local project_root = git.get_project_root(parent_node.absolute_path or parent_node.cwd)
local project_root = git.get_project_root(parent_node.absolute_path)
local status = projects[project_root] or {}
for _, node in ipairs(parent_node.nodes) do
if node.nodes then