refactor(#2830): multi instance marks (#2873)

* refactor(#2830): multi instance marks

* refactor(#2830): multi instance marks

* refactor(#2830): multi instance marks
This commit is contained in:
Alexander Courtis
2024-08-25 12:32:09 +10:00
committed by GitHub
parent 42340952af
commit e962e97cab
11 changed files with 249 additions and 359 deletions

View File

@@ -34,7 +34,7 @@ end
---@param node Node
---@return HighlightedString[]|nil icons
function DecoratorBookmarks:calculate_icons(node)
if core.get_explorer() and core.get_explorer().marks:get_mark(node) then
if core.get_explorer() and core.get_explorer().marks:get(node) then
return { self.icon }
end
end
@@ -43,7 +43,7 @@ end
---@param node Node
---@return string|nil group
function DecoratorBookmarks:calculate_highlight(node)
if self.hl_pos ~= HL_POSITION.none and core.get_explorer() and core.get_explorer().marks:get_mark(node) then
if self.hl_pos ~= HL_POSITION.none and core.get_explorer() and core.get_explorer().marks:get(node) then
return "NvimTreeBookmarkHL"
end
end