Skip to content

Commit 3dac0be

Browse files
committed
Fix partial expansion of grouped nodes
1 parent 4ab16dd commit 3dac0be

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lua/nvim-tree/actions/tree/modifiers/expand.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ local function should_expand(expansion_count, node, should_descend)
5252
return false
5353
end
5454

55-
return not dir.open and should_descend(expansion_count, node)
55+
if not dir.open and should_descend(expansion_count, node) then
56+
core.get_explorer():expand(node)
57+
if node.group_next then
58+
return should_expand(expansion_count, node.group_next, should_descend)
59+
else
60+
return true
61+
end
62+
end
63+
return false
5664
end
5765

5866

0 commit comments

Comments
 (0)