From 23e121d2f74ad2dd1ab0902f120aa90bee2c7edb Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:48:14 +0200 Subject: Keep explicit repeats outside primary feedback --- tests/run.lua | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index 2f470d8..4d512be 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -6861,6 +6861,44 @@ test("Resolved primary actions refresh the highlight timer", function() same(repeated, state.highlight_timer) end) +test("Explicit motion execution bypasses primary feedback operations", function() + fresh_sequence_state() + local host = MemoryHost.new({ + buffer_lines = { "aba" }, + cursor = { line = 1, byte_column = 1 }, + emit_movement_events = false, + }) + local restore_count = 0 + local refresh_count = 0 + local migration_count = 0 + local feedback = { + migrate_command = function() + migration_count = migration_count + 1 + end, + restore_primary = function() + restore_count = restore_count + 1 + end, + refresh_primary = function() + refresh_count = refresh_count + 1 + end, + } + local target_value = target("a") + local plan = motion_plan.build( + target_plan.build(target_value, matching_policy()), + "f" + ) + + local outcome = motion_executor.new({ + host = host, + feedback_service = feedback, + }):execute(text_topology.from_host(host), "n", plan, 1, false) + + same(domain.ActionKind.MOVEMENT, outcome.kind) + same(1, migration_count) + same(0, restore_count) + same(0, refresh_count) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3