Skip to content

Commit 700c7d6

Browse files
committed
fix(#2415): harden sign creation (#2539)
1 parent 4cf6b11 commit 700c7d6

File tree

1 file changed

+5
-1
lines changed
  • lua/nvim-tree/renderer/decorator

1 file changed

+5
-1
lines changed

lua/nvim-tree/renderer/decorator/init.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,12 @@ function Decorator:define_sign(icon)
103103
vim.fn.sign_undefine(name)
104104
end
105105

106+
if self.icon_placement ~= ICON_PLACEMENT.signcolumn or #icon.str < 1 then
107+
return
108+
end
109+
106110
vim.fn.sign_define(name, {
107-
text = icon.str,
111+
text = string.sub(icon.str, 1, 1),
108112
texthl = icon.hl[1],
109113
})
110114
end

0 commit comments

Comments
 (0)