refacto: ubiquitous language renaming

BREAKING
- rename all 'entry' to 'node' or '_node' if shadowing
- rename all 'entries' to 'nodes'
This commit is contained in:
kiyan
2022-02-05 18:10:09 +01:00
parent 10b4a97f7f
commit 4a9e53143b
13 changed files with 113 additions and 113 deletions

View File

@@ -6,7 +6,7 @@ end
local function get_padding_arrows(icon_state)
return function(depth, _, _, node)
if node.entries then
if node.nodes then
local icon = icon_state.icons.folder_icons[node.open and 'arrow_open' or 'arrow_closed']
return string.rep(' ', depth - 2)..icon..' '
end
@@ -18,9 +18,9 @@ local function get_padding_indent_markers(depth, idx, tree, _, markers)
local padding = ""
if depth ~= 0 then
local rdepth = depth/2
markers[rdepth] = idx ~= #tree.entries
markers[rdepth] = idx ~= #tree.nodes
for i=1,rdepth do
if idx == #tree.entries and i == rdepth then
if idx == #tree.nodes and i == rdepth then
padding = padding..''
elseif markers[i] then
padding = padding..''