Fix lint error
This commit is contained in:
parent
3dac0be704
commit
160ae4fce6
@ -44,7 +44,7 @@ end
|
||||
|
||||
---@param expansion_count integer
|
||||
---@param node Node
|
||||
---@param should_descend fun(expansion_count: integer, node: Node): boolean
|
||||
---@param should_descend fun(expansion_count: integer, node: DirectoryNode): boolean
|
||||
---@return boolean
|
||||
local function should_expand(expansion_count, node, should_descend)
|
||||
local dir = node:as(DirectoryNode)
|
||||
@ -52,10 +52,10 @@ local function should_expand(expansion_count, node, should_descend)
|
||||
return false
|
||||
end
|
||||
|
||||
if not dir.open and should_descend(expansion_count, node) then
|
||||
core.get_explorer():expand(node)
|
||||
if node.group_next then
|
||||
return should_expand(expansion_count, node.group_next, should_descend)
|
||||
if not dir.open and should_descend(expansion_count, dir) then
|
||||
core.get_explorer():expand(dir) -- populate node.group_next
|
||||
if dir.group_next then
|
||||
return should_expand(expansion_count, dir.group_next, should_descend)
|
||||
else
|
||||
return true
|
||||
end
|
||||
@ -64,7 +64,7 @@ local function should_expand(expansion_count, node, should_descend)
|
||||
end
|
||||
|
||||
|
||||
---@param should_descend fun(expansion_count: integer, node: Node): boolean
|
||||
---@param should_descend fun(expansion_count: integer, node: DirectoryNode): boolean
|
||||
---@return fun(node): any
|
||||
local function gen_iterator(should_descend)
|
||||
local expansion_count = 0
|
||||
|
||||
@ -188,7 +188,7 @@ Api.tree.search_node = wrap(actions.finders.search_node.fn)
|
||||
Api.tree.collapse_all = wrap(actions.tree.modifiers.collapse.all)
|
||||
|
||||
---@class ApiTreeExpandOpts
|
||||
---@field expand_until (fun(expansion_count: integer, node: Node): boolean)|nil
|
||||
---@field expand_until (fun(expansion_count: integer, node: DirectoryNode): boolean)|nil
|
||||
|
||||
Api.tree.expand_all = wrap_node(actions.tree.modifiers.expand.all)
|
||||
Api.tree.toggle_enable_filters = wrap_explorer_member("filters", "toggle")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user