refacto: add get_nodes_starting_line core util

This commit is contained in:
kiyan
2022-03-26 14:46:44 +01:00
parent 20433ced8a
commit 1831417f05
7 changed files with 20 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ function M.get_node_at_cursor()
if core.get_explorer().cwd == "/" then
line = line + 1
end
return M.get_nodes_by_line(core.get_explorer().nodes, view.View.hide_root_folder and 1 or 2)[line]
return M.get_nodes_by_line(core.get_explorer().nodes, core.get_nodes_starting_line())[line]
end
end