Skip to content

Commit 449b5bd

Browse files
committed
fix(renderer): padding indent with folders only
1 parent 9a02ded commit 449b5bd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@ local M = {}
22

33
local function check_siblings_for_folder(node, with_arrows)
44
if with_arrows then
5+
local has_files = false
6+
local has_folders = false
57
for _, n in pairs(node.parent.nodes) do
6-
if n.nodes then
8+
if n.nodes and node.absolute_path ~= n.absolute_path then
9+
has_folders = true
10+
end
11+
if not n.nodes then
12+
has_files = true
13+
end
14+
if has_files and has_folders then
715
return true
816
end
917
end

0 commit comments

Comments
 (0)