refacto: tree explorer root should be absolute_path not cwd
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user