chore: resolve undefined-field

This commit is contained in:
Alexander Courtis
2024-10-25 14:57:01 +11:00
parent e115199c5f
commit dd937d017f
3 changed files with 7 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ local HL_POSITION = require("nvim-tree.enum").HL_POSITION
local ICON_PLACEMENT = require("nvim-tree.enum").ICON_PLACEMENT
local Decorator = require("nvim-tree.renderer.decorator")
local DirectoryNode = require("nvim-tree.node.directory")
---@class (exact) DecoratorModified: Decorator
---@field icon HighlightedString|nil
@@ -55,7 +56,7 @@ function DecoratorModified:calculate_highlight(node)
return nil
end
if node.nodes then
if node:is(DirectoryNode) then
return "NvimTreeModifiedFolderHL"
else
return "NvimTreeModifiedFileHL"