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:
@@ -12,7 +12,7 @@ function M.fn(fname)
|
||||
end
|
||||
running[fname] = true
|
||||
|
||||
local i = view.is_root_folder_visible(TreeExplorer) and 1 or 0
|
||||
local i = view.is_root_folder_visible() and 1 or 0
|
||||
local tree_altered = false
|
||||
|
||||
local function iterate_nodes(nodes)
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -77,7 +77,7 @@ function M.fn()
|
||||
end
|
||||
|
||||
if found_something and view.is_visible() then
|
||||
if view.is_root_folder_visible(TreeExplorer) then
|
||||
if view.is_root_folder_visible() then
|
||||
index = index + 1
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user