File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 578
578
--- @return Node | nil
579
579
--- @return number | nil
580
580
function Explorer :get_node_from_path (path )
581
-
582
581
if self .absolute_path == path then
583
582
return self
584
583
end
604
603
--- If node is nil do nothing.
605
604
--- @param node Node ? node to focus
606
605
function Explorer :focus_node_or_parent (node )
607
-
608
606
while node do
609
607
local found_node , i = self :find_node (function (node_ )
610
608
return node_ .absolute_path == node .absolute_path
@@ -626,11 +624,11 @@ end
626
624
--- @return number
627
625
function Explorer :find_node (fn )
628
626
local node , i = Iterator .builder (self .nodes )
629
- :matcher (fn )
630
- :recursor (function (node )
631
- return node .group_next and { node .group_next } or (node .open and # node .nodes > 0 and node .nodes )
632
- end )
633
- :iterate ()
627
+ :matcher (fn )
628
+ :recursor (function (node )
629
+ return node .group_next and { node .group_next } or (node .open and # node .nodes > 0 and node .nodes )
630
+ end )
631
+ :iterate ()
634
632
i = view .is_root_folder_visible () and i or i - 1
635
633
if node and node .explorer .live_filter .filter then
636
634
i = i + 1
You can’t perform that action at this time.
0 commit comments