Skip to content

Commit 7293f8d

Browse files
committed
fix(renderer): padding when git icons are after the name
fixes #1253
1 parent d88d12f commit 7293f8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/nvim-tree/renderer/builder.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ function Builder:_unwrap_git_data(git_icons_and_hl_groups, offset)
9494
end
9595

9696
local icon = ""
97-
for _, v in ipairs(git_icons_and_hl_groups) do
97+
for i, 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 .. self.git_icon_padding
100+
local remove_padding = self.is_git_after and i == #git_icons_and_hl_groups
101+
icon = icon .. v.icon .. (remove_padding and "" or self.git_icon_padding)
101102
end
102103
end
103104
return icon

0 commit comments

Comments
 (0)