From 38b8acb54d10b788eae127a2b4756c37a7828e88 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:35:21 +0200 Subject: Store persistent overlay anchors --- tests/run.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index 03e1c2d..2b54ff1 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -6045,6 +6045,30 @@ test("Operator acquisition keeps feedback temporary", function() same(0, map_size(host:highlights())) end) +test("Persistent feedback stores overlay identity and anchor", function() + local state, transitions = fresh_sequence_state() + local host = MemoryHost.new({ buffer_lines = { "x", "axa" } }) + local feedback = feedback_service.new({ + host = host, + transitions = transitions, + }) + local shared_target = target_plan.build(target("a"), matching_policy()) + local movement = motion_plan.build(shared_target, "f") + local persistent = feedback:request_persistent({ + context = "n", + anchor = domain.Position.new(2, 2), + target_plan = shared_target, + motion_plan = movement, + window = "window-anchor", + }) + local resource = state.target_overlays[1] + + same(persistent.identity, resource.identity) + same("window-anchor", resource.window) + same("CleverFChar", resource.group) + same(2, resource.anchor_line) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3