@@ -25,30 +25,30 @@ local function get_padding_indent_markers(depth, idx, nodes_number, markers, wit
25
25
26
26
if depth > 0 then
27
27
local has_folder_sibling = check_siblings_for_folder (node , with_arrows )
28
- local rdepth = depth / 2
29
- markers [rdepth ] = idx ~= nodes_number
30
- for i = 1 , rdepth do
28
+ local indent = string.rep ( " " , M . config . indent_width - 1 )
29
+ markers [depth ] = idx ~= nodes_number
30
+ for i = 1 , depth do
31
31
local glyph
32
- if idx == nodes_number and i == rdepth then
32
+ if idx == nodes_number and i == depth then
33
33
glyph = M .config .indent_markers .icons .corner
34
- elseif markers [i ] and i == rdepth then
34
+ elseif markers [i ] and i == depth then
35
35
glyph = M .config .indent_markers .icons .item
36
36
elseif markers [i ] then
37
37
glyph = M .config .indent_markers .icons .edge
38
38
else
39
39
glyph = M .config .indent_markers .icons .none
40
40
end
41
41
42
- if not with_arrows or (inline_arrows and (rdepth ~= i or not node .nodes )) then
43
- padding = padding .. glyph .. " "
42
+ if not with_arrows or (inline_arrows and (depth ~= i or not node .nodes )) then
43
+ padding = padding .. glyph .. indent
44
44
elseif inline_arrows then
45
45
padding = padding
46
- elseif idx == nodes_number and i == rdepth and has_folder_sibling then
47
- padding = padding .. base_padding .. glyph .. " ── "
48
- elseif rdepth == i and not node .nodes and has_folder_sibling then
49
- padding = padding .. base_padding .. glyph .. " " .. base_padding
46
+ elseif idx == nodes_number and i == depth and has_folder_sibling then
47
+ padding = padding .. base_padding .. glyph .. " ──" .. indent
48
+ elseif depth == i and not node .nodes and has_folder_sibling then
49
+ padding = padding .. base_padding .. glyph .. indent .. base_padding
50
50
else
51
- padding = padding .. base_padding .. glyph .. " "
51
+ padding = padding .. base_padding .. glyph .. indent
52
52
end
53
53
end
54
54
end
@@ -71,11 +71,12 @@ function M.get_padding(depth, idx, nodes_number, node, markers)
71
71
local show_arrows = M .config .icons .show .folder_arrow
72
72
local show_markers = M .config .indent_markers .enable
73
73
local inline_arrows = M .config .indent_markers .inline_arrows
74
+ local indent_width = M .config .indent_width
74
75
75
76
if show_markers then
76
77
padding = padding .. get_padding_indent_markers (depth , idx , nodes_number , markers , show_arrows , inline_arrows , node )
77
78
else
78
- padding = padding .. string.rep (" " , depth )
79
+ padding = padding .. string.rep (" " , depth * indent_width )
79
80
end
80
81
81
82
if show_arrows then
0 commit comments