Skip to content

Commit 621d634

Browse files
committed
fixed renderer.icons.show.modified = false crash
1 parent c7b20ca commit 621d634

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/nvim-tree/renderer/components/modified.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local HIGHLIGHT = "NvimTreeModifiedFile"
88
---@param node table
99
---@return HighlightedString|nil modified icon
1010
function M.get_icon(node)
11-
if not modified.is_modified(node) then
11+
if not modified.is_modified(node) or not M.show_icon then
1212
return nil
1313
end
1414

@@ -30,7 +30,8 @@ function M.get_highlight(node)
3030
end
3131

3232
function M.setup(opts)
33-
M.icon = opts.renderer.icons.show.modified and opts.renderer.icons.glyphs.modified or nil
33+
M.icon = opts.renderer.icons.glyphs.modified
34+
M.show_icon = opts.renderer.icons.show.modified
3435

3536
M.setup_signs()
3637
end

0 commit comments

Comments
 (0)