Skip to content

Commit 01d45ee

Browse files
committed
fix(directory): correctly pass node instead of self ot should_descend
1 parent 721e3cd commit 01d45ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/nvim-tree/node/directory.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,14 @@ end
296296
---@return fun(expansion_count: integer, node: Node): boolean
297297
function DirectoryNode:limit_folder_discovery(should_descend)
298298
local MAX_FOLDER_DISCOVERY = self.explorer.opts.actions.expand_all.max_folder_discovery
299-
return function(expansion_count)
299+
return function(expansion_count, node)
300300
local should_halt = expansion_count >= MAX_FOLDER_DISCOVERY
301301
if should_halt then
302302
notify.warn("expansion iteration was halted after " .. MAX_FOLDER_DISCOVERY .. " discovered folders")
303303
return false
304304
end
305305

306-
return should_descend(expansion_count, self)
306+
return should_descend(expansion_count, node)
307307
end
308308
end
309309

0 commit comments

Comments
 (0)