From d88d12f5bc3736120bbd96157c845e0a5d201587 Mon Sep 17 00:00:00 2001 From: kiyan Date: Sat, 14 May 2022 13:31:32 +0200 Subject: [PATCH] Revert "#1253 only pad git icons when they are present (#1259)" This reverts commit 90d7b8edb1d715086b34572a0fb742faf23a271b. fixes #1267 --- lua/nvim-tree/renderer/builder.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/nvim-tree/renderer/builder.lua b/lua/nvim-tree/renderer/builder.lua index 57abd006..219861ef 100644 --- a/lua/nvim-tree/renderer/builder.lua +++ b/lua/nvim-tree/renderer/builder.lua @@ -97,7 +97,7 @@ function Builder:_unwrap_git_data(git_icons_and_hl_groups, offset) for _, v in ipairs(git_icons_and_hl_groups) do if #v.icon > 0 then self:_insert_highlight(v.hl, offset + #icon, offset + #icon + #v.icon) - icon = icon .. v.icon + icon = icon .. v.icon .. self.git_icon_padding end end return icon @@ -138,11 +138,11 @@ end function Builder:_format_line(before, after, git_icons) return string.format( - "%s%s%s%s", + "%s%s%s %s", before, - #git_icons > 0 and not self.is_git_after and git_icons .. self.git_icon_padding or "", + self.is_git_after and "" or git_icons, after, - #git_icons > 0 and self.is_git_after and self.git_icon_padding .. git_icons or "" + self.is_git_after and git_icons or "" ) end