From 0809f1eb0c73648cae15806cf8a43ad35f445f7c Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 11:34:56 +0200 Subject: Preserve colorscheme default labels --- lua/clever_f/testing/memory_host.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lua/clever_f/testing') diff --git a/lua/clever_f/testing/memory_host.lua b/lua/clever_f/testing/memory_host.lua index 42dab71..459c9a8 100644 --- a/lua/clever_f/testing/memory_host.lua +++ b/lua/clever_f/testing/memory_host.lua @@ -163,6 +163,7 @@ function MemoryHost.new(options) _prompts = {}, _redraws = {}, _diagnostics = {}, + _highlight_groups = copy(options.highlight_groups or {}), _highlights = {}, _timers = {}, _event_registrations = {}, @@ -646,6 +647,22 @@ function MemoryHost:diagnostics() return copy(self._diagnostics) end +function MemoryHost:read_highlight_group(name) + if type(name) ~= "string" or name == "" then + error("highlight group name must be a nonempty string", 2) + end + local definition = self._highlight_groups[name] + self:_record("read_highlight_group", { + name = name, + defined = definition ~= nil, + }) + return copy(definition) +end + +function MemoryHost:highlight_groups() + return copy(self._highlight_groups) +end + function MemoryHost:create_highlight(specification) if type(specification) ~= "table" then error("highlight specification must be a table", 2) -- cgit v1.2.3