refactor(#2886): multi instance: node group functions refactoring (#2959)

* move last_group_node to DirectoryNode

* move add BaseNode:as and more doc

* revert parameter name changes

* revert parameter name changes

* add Class

* move group methods into DN

* tidy group methods

* tidy group methods

* tidy group methods

* tidy group methods

* parent is DirectoryNode

* tidy expand all

* BaseNode -> Node

* move watcher to DirectoryNode

* last_group_node is DirectoryNode only

* simplify create-file

* simplify parent

* simplify collapse-all

* simplify live-filter

* style
This commit is contained in:
Alexander Courtis
2024-10-20 17:23:22 +11:00
committed by GitHub
parent fb2070db94
commit 8331a24c77
22 changed files with 284 additions and 258 deletions

View File

@@ -78,7 +78,7 @@ local function expand_node(node)
---@cast node DirectoryNode
-- Expand the node.
-- Should never collapse since we checked open.
node:expand_or_collapse()
node:expand_or_collapse(false)
end
end
@@ -102,7 +102,7 @@ local function move_next_recursive(what, skip_gitignored)
end
if node_init:is(DirectoryNode) and valid and not node_init.open then
---@cast node_init DirectoryNode
node_init:expand_or_collapse()
node_init:expand_or_collapse(false)
end
move("next", what, skip_gitignored)