Only renders the git icon if the icon is not empty (#633)

This commit is contained in:
Sávio Carlos 2021-09-25 11:37:58 -03:00 committed by GitHub
parent da26dfa79a
commit 67805502d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,8 +231,10 @@ if icon_state.show_git_icon then
icons = git_icon_state.dirty
end
for _, v in ipairs(icons) do
table.insert(hl, { v.hl, line, depth+icon_len+#icon, depth+icon_len+#icon+#v.icon })
icon = icon..v.icon..icon_padding
if #v.icon > 0 then
table.insert(hl, { v.hl, line, depth+icon_len+#icon, depth+icon_len+#icon+#v.icon })
icon = icon..v.icon..icon_padding
end
end
return icon