Skip to content

Commit 2c1bb3b

Browse files
committed
refactor(#2942): style
1 parent df94463 commit 2c1bb3b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lua/nvim-tree/explorer/init.lua

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ end
578578
---@return Node|nil
579579
---@return number|nil
580580
function Explorer:get_node_from_path(path)
581-
582581
if self.absolute_path == path then
583582
return self
584583
end
@@ -604,7 +603,6 @@ end
604603
---If node is nil do nothing.
605604
---@param node Node? node to focus
606605
function Explorer:focus_node_or_parent(node)
607-
608606
while node do
609607
local found_node, i = self:find_node(function(node_)
610608
return node_.absolute_path == node.absolute_path
@@ -626,11 +624,11 @@ end
626624
---@return number
627625
function Explorer:find_node(fn)
628626
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()
634632
i = view.is_root_folder_visible() and i or i - 1
635633
if node and node.explorer.live_filter.filter then
636634
i = i + 1

0 commit comments

Comments
 (0)