fix: symlink file icons rendered when renderer.icons.show.file = false, folder.symlink* was incorrectly rendered as folder.default|open (#2983)
* fix: folder.symlink* was incorrectly rendered as folder.default|open * fix: symlink file icons rendered when renderer.icons.show.file = false
This commit is contained in:
parent
82ab19ebf7
commit
2156bc08c9
@ -189,7 +189,11 @@ function Builder:build_symlink(node)
|
||||
symlink_formatted = string.format("%s%s%s", symlink_formatted, arrow, link_to)
|
||||
end
|
||||
|
||||
if self.opts.renderer.icons.show.file then
|
||||
return { str = icon, hl = { "NvimTreeSymlinkIcon" } }, { str = symlink_formatted, hl = { "NvimTreeSymlink" } }
|
||||
else
|
||||
return { str = "", hl = {} }, { str = symlink_formatted, hl = { "NvimTreeSymlink" } }
|
||||
end
|
||||
end
|
||||
|
||||
---@private
|
||||
|
||||
@ -16,7 +16,7 @@ end
|
||||
---@return string icon
|
||||
---@return string? name
|
||||
local function get_folder_icon_default(node, has_children)
|
||||
local is_symlink = node.links_to ~= nil
|
||||
local is_symlink = node.link_to ~= nil
|
||||
local n
|
||||
if is_symlink and node.open then
|
||||
n = M.config.glyphs.folder.symlink_open
|
||||
|
||||
Loading…
Reference in New Issue
Block a user