summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:35:21 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 12:35:21 +0200
commit38b8acb54d10b788eae127a2b4756c37a7828e88 (patch)
tree30ca417d9b4e9715587ee00d40a636c0b1330c9f /tests
parenta00447c069fbfc10be24b47de9de7dd87db51a2b (diff)
Store persistent overlay anchors
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua24
1 files changed, 24 insertions, 0 deletions
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