File tree 1 file changed +5
-5
lines changed
lua/nvim-tree/actions/finders
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,13 @@ function M.fn(fname)
26
26
running [fname ] = true
27
27
28
28
local ps = log .profile_start (" find file %s" , fname )
29
- local line = core .get_nodes_starting_line ()
29
+
30
+ -- first line is the root node
31
+ local line = core .get_nodes_starting_line () - 1
30
32
31
33
local absolute_paths_searched = {}
32
34
33
- local found = Iterator .builder (core .get_explorer (). nodes )
35
+ local found = Iterator .builder ({ core .get_explorer () } )
34
36
:matcher (function (node )
35
37
return node .absolute_path == fname_real or node .link_to == fname_real
36
38
end )
@@ -47,9 +49,7 @@ function M.fn(fname)
47
49
48
50
if abs_match or link_match then
49
51
node .open = true
50
- if # node .nodes == 0 then
51
- core .get_explorer ():expand (node )
52
- end
52
+ core .get_explorer ():expand (node )
53
53
end
54
54
end )
55
55
:recursor (function (node )
You can’t perform that action at this time.
0 commit comments