fix(renderer): padding indent with folders only
This commit is contained in:
parent
9a02dedd92
commit
449b5bd0cb
@ -2,8 +2,16 @@ local M = {}
|
|||||||
|
|
||||||
local function check_siblings_for_folder(node, with_arrows)
|
local function check_siblings_for_folder(node, with_arrows)
|
||||||
if with_arrows then
|
if with_arrows then
|
||||||
|
local has_files = false
|
||||||
|
local has_folders = false
|
||||||
for _, n in pairs(node.parent.nodes) do
|
for _, n in pairs(node.parent.nodes) do
|
||||||
if n.nodes then
|
if n.nodes and node.absolute_path ~= n.absolute_path then
|
||||||
|
has_folders = true
|
||||||
|
end
|
||||||
|
if not n.nodes then
|
||||||
|
has_files = true
|
||||||
|
end
|
||||||
|
if has_files and has_folders then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user