Skip to content

Commit ef062a4

Browse files
committed
revert parameter name changes
1 parent c32ee3e commit ef062a4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

lua/nvim-tree/renderer/builder.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ end
349349
---@private
350350
---@param node Node
351351
---@param idx integer line number starting at 1
352-
---@param siblings integer of node
353-
function Builder:build_line(node, idx, siblings)
352+
---@param num_children integer of node
353+
function Builder:build_line(node, idx, num_children)
354354
-- various components
355-
local indent_markers = pad.get_indent_markers(self.depth, idx, siblings, node, self.markers)
355+
local indent_markers = pad.get_indent_markers(self.depth, idx, num_children, node, self.markers)
356356
local arrows = pad.get_arrows(node)
357357

358358
-- main components
@@ -434,12 +434,12 @@ function Builder:build_lines(node)
434434
if not node then
435435
node = self.explorer
436436
end
437-
local siblings = self:num_visible(node.nodes)
437+
local num_children = self:num_visible(node.nodes)
438438
local idx = 1
439439
for _, n in ipairs(node.nodes) do
440440
if not n.hidden then
441441
self:build_signs(n)
442-
self:build_line(n, idx, siblings)
442+
self:build_line(n, idx, num_children)
443443
idx = idx + 1
444444
end
445445
end

lua/nvim-tree/renderer/components/padding.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ local function check_siblings_for_folder(node, with_arrows)
1919
return false
2020
end
2121

22-
local function get_padding_indent_markers(depth, idx, siblings, markers, with_arrows, inline_arrows, node, early_stop)
22+
local function get_padding_indent_markers(depth, idx, num_children, markers, with_arrows, inline_arrows, node, early_stop)
2323
local base_padding = with_arrows and (not node.nodes or depth > 0) and " " or ""
2424
local padding = (inline_arrows or depth == 0) and base_padding or ""
2525

2626
if depth > 0 then
2727
local has_folder_sibling = check_siblings_for_folder(node, with_arrows)
2828
local indent = string.rep(" ", M.config.indent_width - 1)
29-
markers[depth] = idx ~= siblings
29+
markers[depth] = idx ~= num_children
3030
for i = 1, depth - early_stop do
3131
local glyph
32-
if idx == siblings and i == depth then
32+
if idx == num_children and i == depth then
3333
local bottom_width = M.config.indent_width - 2 + (with_arrows and not inline_arrows and has_folder_sibling and 2 or 0)
3434
glyph = M.config.indent_markers.icons.corner
3535
.. string.rep(M.config.indent_markers.icons.bottom, bottom_width)
@@ -46,7 +46,7 @@ local function get_padding_indent_markers(depth, idx, siblings, markers, with_ar
4646
padding = padding .. glyph
4747
elseif inline_arrows then
4848
padding = padding
49-
elseif idx ~= siblings and depth == i and not node.nodes and has_folder_sibling then
49+
elseif idx ~= num_children and depth == i and not node.nodes and has_folder_sibling then
5050
padding = padding .. base_padding .. glyph .. base_padding
5151
else
5252
padding = padding .. base_padding .. glyph
@@ -58,11 +58,11 @@ end
5858

5959
---@param depth integer
6060
---@param idx integer
61-
---@param siblings integer
61+
---@param num_children integer
6262
---@param node Node
6363
---@param markers table
6464
---@return HighlightedString[]
65-
function M.get_indent_markers(depth, idx, siblings, node, markers, early_stop)
65+
function M.get_indent_markers(depth, idx, num_children, node, markers, early_stop)
6666
local str = ""
6767

6868
local show_arrows = M.config.icons.show.folder_arrow
@@ -71,7 +71,7 @@ function M.get_indent_markers(depth, idx, siblings, node, markers, early_stop)
7171
local indent_width = M.config.indent_width
7272

7373
if show_markers then
74-
str = str .. get_padding_indent_markers(depth, idx, siblings, markers, show_arrows, inline_arrows, node, early_stop or 0)
74+
str = str .. get_padding_indent_markers(depth, idx, num_children, markers, show_arrows, inline_arrows, node, early_stop or 0)
7575
else
7676
str = str .. string.rep(" ", depth * indent_width)
7777
end

0 commit comments

Comments
 (0)