Skip to content

Commit d88d12f

Browse files
committed
Revert "#1253 only pad git icons when they are present (#1259)"
This reverts commit 90d7b8e. fixes #1267
1 parent aefa66c commit d88d12f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lua/nvim-tree/renderer/builder.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function Builder:_unwrap_git_data(git_icons_and_hl_groups, offset)
9797
for _, v in ipairs(git_icons_and_hl_groups) do
9898
if #v.icon > 0 then
9999
self:_insert_highlight(v.hl, offset + #icon, offset + #icon + #v.icon)
100-
icon = icon .. v.icon
100+
icon = icon .. v.icon .. self.git_icon_padding
101101
end
102102
end
103103
return icon
@@ -138,11 +138,11 @@ end
138138

139139
function Builder:_format_line(before, after, git_icons)
140140
return string.format(
141-
"%s%s%s%s",
141+
"%s%s%s %s",
142142
before,
143-
#git_icons > 0 and not self.is_git_after and git_icons .. self.git_icon_padding or "",
143+
self.is_git_after and "" or git_icons,
144144
after,
145-
#git_icons > 0 and self.is_git_after and self.git_icon_padding .. git_icons or ""
145+
self.is_git_after and git_icons or ""
146146
)
147147
end
148148

0 commit comments

Comments
 (0)