add special files using absolute paths (#707)
This commit is contained in:
@@ -291,6 +291,9 @@ local function update_draw_data(tree, depth, markers)
|
|||||||
end
|
end
|
||||||
if not has_children then folder_hl = "NvimTreeEmptyFolderName" end
|
if not has_children then folder_hl = "NvimTreeEmptyFolderName" end
|
||||||
if node.open then folder_hl = "NvimTreeOpenedFolderName" end
|
if node.open then folder_hl = "NvimTreeOpenedFolderName" end
|
||||||
|
if special[node.absolute_path] then
|
||||||
|
folder_hl = "NvimTreeSpecialFolderName"
|
||||||
|
end
|
||||||
set_folder_hl(index, offset, #icon, #name+#git_icon, folder_hl)
|
set_folder_hl(index, offset, #icon, #name+#git_icon, folder_hl)
|
||||||
if git_hl then
|
if git_hl then
|
||||||
set_folder_hl(index, offset, #icon, #name+#git_icon, git_hl)
|
set_folder_hl(index, offset, #icon, #name+#git_icon, git_hl)
|
||||||
@@ -313,7 +316,7 @@ local function update_draw_data(tree, depth, markers)
|
|||||||
else
|
else
|
||||||
local icon
|
local icon
|
||||||
local git_icons
|
local git_icons
|
||||||
if special[node.name] then
|
if special[node.absolute_path] or special[node.name] then
|
||||||
icon = get_special_icon()
|
icon = get_special_icon()
|
||||||
git_icons = get_git_icons(node, index, offset, 0)
|
git_icons = get_git_icons(node, index, offset, 0)
|
||||||
table.insert(hl, {'NvimTreeSpecialFile', index, offset+#git_icons, -1})
|
table.insert(hl, {'NvimTreeSpecialFile', index, offset+#git_icons, -1})
|
||||||
|
|||||||
Reference in New Issue
Block a user