We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a0707 commit 4fd81e2Copy full SHA for 4fd81e2
lua/nvim-tree/lib.lua
@@ -30,7 +30,13 @@ function M.get_node_at_cursor()
30
return { name = ".." }
31
end
32
33
- return utils.get_nodes_by_line(core.get_explorer().nodes, core.get_nodes_starting_line())[line]
+ local nodes_by_line = utils.get_nodes_by_line(core.get_explorer().nodes, core.get_nodes_starting_line())[line]
34
+
35
+ if nodes_by_line == nil and line == 1 and not view.is_root_folder_visible(core.get_cwd()) then
36
+ return { name = ".." }
37
+ end
38
39
+ return nodes_by_line
40
41
42
---Create a sanitized partial copy of a node, populating children recursively.
0 commit comments