refacto: move renderer git into file

also view.is_root_folder_modifier_visible don't take the tree as
parameter
This commit is contained in:
kiyan
2022-03-09 21:32:15 +01:00
parent 60a9c86c53
commit 144bce74a5
6 changed files with 200 additions and 195 deletions

View File

@@ -56,7 +56,7 @@ function M.parent_node(should_close)
parent.open = false
altered_tree = true
end
if not view.is_root_folder_visible(TreeExplorer) then
if not view.is_root_folder_visible() then
line = line - 1
end
view.set_cursor { line, 0 }
@@ -109,7 +109,7 @@ function M.sibling(direction)
local target_node = parent.nodes[index]
line, _ = get_line_from_node(target_node)(TreeExplorer.nodes, true)
if not view.is_root_folder_visible(TreeExplorer) then
if not view.is_root_folder_visible() then
line = line - 1
end
view.set_cursor { line, 0 }