Skip to content

Commit 5084dd4

Browse files
committed
wip(explorer): rename expand method to expand_dir_node and all places using it
1 parent 2ea9992 commit 5084dd4

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

lua/nvim-tree/actions/finders/find-file.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function M.fn(path)
6666
dir.open = true
6767
end
6868
if #dir.nodes == 0 then
69-
core.get_explorer():expand(dir)
69+
core.get_explorer():expand_dir_node(dir)
7070
if dir.group_next and incremented_line then
7171
line = line - 1
7272
end

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ local function expand(node)
2323
node = node:last_group_node()
2424
node.open = true
2525
if #node.nodes == 0 then
26-
core.get_explorer():expand(node)
26+
core.get_explorer():expand_dir_node(node)
2727
end
2828
end
2929

@@ -66,7 +66,7 @@ local function should_expand(expansion_count, node, should_descend)
6666

6767
if not dir.open and should_descend(expansion_count, node) then
6868
if #node.nodes == 0 then
69-
core.get_explorer():expand(dir) -- populate node.group_next
69+
core.get_explorer():expand_dir_node(dir) -- populate node.group_next
7070
end
7171

7272
if dir.group_next then

lua/nvim-tree/explorer/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function Explorer:create_autocmds()
194194
end
195195

196196
---@param node DirectoryNode
197-
function Explorer:expand(node)
197+
function Explorer:expand_dir_node(node)
198198
self:_load(node)
199199
end
200200

lua/nvim-tree/node/directory.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function DirectoryNode:expand_or_collapse(toggle_group)
167167
end
168168

169169
if #self.nodes == 0 then
170-
self.explorer:expand(self)
170+
self.explorer:expand_dir_node(self)
171171
end
172172

173173
local head_node = self:get_parent_of_group() or self

0 commit comments

Comments
 (0)