summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 13:44:53 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 13:44:53 +0200
commitecf11c00fb9b61d5c3fb1bf4e2bf933fc628a800 (patch)
tree0141ab287c47237fb1e6d26a4984c3be3d31ad78
parent50f35d681f48a59a77a009f201fd4cf3a287904c (diff)
Refresh failed-search highlight timeout
-rw-r--r--tests/run.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 6a49408..97a9a6d 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -7656,6 +7656,32 @@ test("Escape primary action starts no highlight timer", function()
end
end)
+test("Failed resolved primary search still refreshes highlight timeout", function()
+ local state = fresh_sequence_state()
+ local origin = domain.Position.new(1, 1)
+ local host = MemoryHost.new({
+ buffer_lines = { "abc" },
+ cursor = origin,
+ input_packets = { { kind = "text", text = "z" } },
+ configuration = {
+ mark_cursor = false,
+ mark_char = true,
+ highlight_timeout_ms = 40,
+ },
+ emit_movement_events = false,
+ })
+ local coordinator = sequence_coordinator.new({ host = host })
+
+ local outcome = coordinator:primary("f")
+
+ same(domain.ActionKind.FAILED_SEARCH, outcome.kind)
+ same(origin, outcome.position)
+ same(origin, host:read_cursor())
+ truthy(state.highlight_timer ~= nil)
+ same(state.highlight_timer, coordinator:last_primary_resolution().highlight_timer)
+ truthy(host:timers()[state.highlight_timer].active)
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then