diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:17:08 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:17:08 +0200 |
| commit | c1874daa5f61c16ee05466aec15cca6971bc1277 (patch) | |
| tree | 1286a0e2e6117cc39c67c83f21c6ac96a6f76be0 | |
| parent | f838dddfc1ba8ea6f1ec3b6cf5fd2c2fcedf637d (diff) | |
Keep Escape outside timer start
| -rw-r--r-- | tests/run.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index f954b7c..ea0d207 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -5730,6 +5730,36 @@ test("Acquisition preserves descriptor writes after input failure", function() same(old_target, state:get_previous_target("n")) end) +test("Escape acquisition stays outside highlight timer start", function() + local state, transitions = fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { + mark_cursor = false, + mark_char = true, + highlight_timeout_ms = 25, + }, + input_packets = { + { kind = "special_key", name = "Escape", bytes = { 27 } }, + }, + }) + local feedback = feedback_service.new({ + host = host, + transitions = transitions, + }) + local result = acquisition_service.new({ + host = host, + transitions = transitions, + feedback = feedback, + }):acquire("f", "n", domain.Position.new(1, 1), nil, nil) + + same(domain.ActionKind.ESCAPE, result.outcome.kind) + same(nil, state.highlight_timer) + same(0, #feedback:persistent_requests()) + for _, operation in ipairs(host:operations()) do + falsy(operation.operation == "start_timer") + end +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
