diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:44:25 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:44:25 +0200 |
| commit | 75879e3356685a145fab752c0b3365faa832f8d4 (patch) | |
| tree | 9f7ea6967127d42fe1a244fcb8b7dc652db7cd9b /tests | |
| parent | f3000e4cab6255680e77256140c96a6decdba9c9 (diff) | |
Refresh primary highlight timeout
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index cf7edb9..d0838e8 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7605,6 +7605,35 @@ test("Primary coordination executes resolved movement through MotionExecutor", f ) end) +test("Fresh and repeated primary actions refresh highlight timeout", function() + local state = fresh_sequence_state() + local host = MemoryHost.new({ + buffer_lines = { "aaaa" }, + cursor = { line = 1, byte_column = 1 }, + input_packets = { { kind = "text", text = "a" } }, + configuration = { + mark_cursor = false, + mark_char = true, + highlight_timeout_ms = 25, + }, + emit_movement_events = false, + }) + local coordinator = sequence_coordinator.new({ host = host }) + + same(domain.ActionKind.MOVEMENT, coordinator:primary("f").kind) + local fresh_timer = state.highlight_timer + truthy(fresh_timer ~= nil) + same(fresh_timer, coordinator:last_primary_resolution().highlight_timer) + + same(domain.ActionKind.MOVEMENT, coordinator:primary("f").kind) + local repeated_timer = state.highlight_timer + truthy(repeated_timer ~= nil) + falsy(fresh_timer == repeated_timer) + falsy(host:timers()[fresh_timer].active) + truthy(host:timers()[repeated_timer].active) + same(repeated_timer, coordinator:last_primary_resolution().highlight_timer) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
