Skip to content

Commit 9e19b5e

Browse files
committed
fix(node.directory): fix <E> not expanding all folders
1 parent 2f18543 commit 9e19b5e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lua/nvim-tree/node/directory.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ end
322322
---@private
323323
---@param _ integer expansion_count
324324
---@return boolean
325-
function DirectoryNode:descend_until_empty(_)
326-
local EXCLUDE = to_lookup_table(self.explorer.opts.actions.expand_all.exclude)
327-
local should_exclude = EXCLUDE[self.name]
325+
function DirectoryNode:descend_until_empty(node)
326+
local EXCLUDE = to_lookup_table(node.explorer.opts.actions.expand_all.exclude)
327+
local should_exclude = EXCLUDE[node.name]
328328
return not should_exclude
329329
end
330330

@@ -341,7 +341,7 @@ function DirectoryNode:should_expand(expansion_count, node, should_descend)
341341

342342
if not dir.open and should_descend(expansion_count, node) then
343343
if #node.nodes == 0 then
344-
self.explorer:expand_dir_node(dir) -- populate node.group_next
344+
node.explorer:expand_dir_node(dir) -- populate node.group_next
345345
end
346346

347347
if dir.group_next then
@@ -376,7 +376,7 @@ function DirectoryNode:gen_iterator(should_descend)
376376
expansion_count = expansion_count + 1
377377
node = node:as(DirectoryNode)
378378
if node then
379-
self:expand_dir_node()
379+
node:expand_dir_node()
380380
end
381381
end
382382
end)

0 commit comments

Comments
 (0)