Skip to content

Commit 1352cb3

Browse files
committed
naming fix for luacheck 0.26.0
1 parent 7b0ebf8 commit 1352cb3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lua/nvim-tree/utils.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ end
9999
-- get the node from the tree that matches the predicate
100100
-- @param nodes list of node
101101
-- @param fn function(node): boolean
102-
function M.find_node(_nodes, _fn)
103-
local function iter(nodes, fn)
102+
function M.find_node(nodes, fn)
103+
local function iter(nodes_, fn_)
104104
local i = 1
105-
for _, node in ipairs(nodes) do
106-
if fn(node) then
105+
for _, node in ipairs(nodes_) do
106+
if fn_(node) then
107107
return node, i
108108
end
109109
if node.open and #node.nodes > 0 then
110-
local n, idx = iter(node.nodes, fn)
110+
local n, idx = iter(node.nodes, fn_)
111111
i = i + idx
112112
if n then
113113
return n, i
@@ -118,7 +118,7 @@ function M.find_node(_nodes, _fn)
118118
end
119119
return nil, i
120120
end
121-
local node, i = iter(_nodes, _fn)
121+
local node, i = iter(nodes, fn)
122122
i = require("nvim-tree.view").View.hide_root_folder and i - 1 or i
123123
return node, i
124124
end

0 commit comments

Comments
 (0)