@@ -30,25 +30,27 @@ local function get_padding_indent_markers(depth, idx, nodes_number, markers, wit
30
30
for i = 1 , depth do
31
31
local glyph
32
32
if idx == nodes_number and i == depth then
33
- glyph = M .config .indent_markers .icons .corner
33
+ local bottom_width = M .config .indent_width - 2 +
34
+ (with_arrows and not inline_arrows and has_folder_sibling and 2 or 0 )
35
+ glyph = M .config .indent_markers .icons .corner ..
36
+ string.rep (M .config .indent_markers .icons .bottom , bottom_width ) ..
37
+ (M .config .indent_width > 1 and " " or " " )
34
38
elseif markers [i ] and i == depth then
35
- glyph = M .config .indent_markers .icons .item
39
+ glyph = M .config .indent_markers .icons .item .. indent
36
40
elseif markers [i ] then
37
- glyph = M .config .indent_markers .icons .edge
41
+ glyph = M .config .indent_markers .icons .edge .. indent
38
42
else
39
- glyph = M .config .indent_markers .icons .none
43
+ glyph = M .config .indent_markers .icons .none .. indent
40
44
end
41
45
42
46
if not with_arrows or (inline_arrows and (depth ~= i or not node .nodes )) then
43
- padding = padding .. glyph .. indent
47
+ padding = padding .. glyph
44
48
elseif inline_arrows then
45
49
padding = 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
+ elseif idx ~= nodes_number and depth == i and not node .nodes and has_folder_sibling then
51
+ padding = padding .. base_padding .. glyph .. base_padding
50
52
else
51
- padding = padding .. base_padding .. glyph .. indent
53
+ padding = padding .. base_padding .. glyph
52
54
end
53
55
end
54
56
end
0 commit comments