summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 11:59:36 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 11:59:36 +0200
commit916592836fd92dbb7d6c498c26ffd83fa290384e (patch)
tree41360d26d5fe0c4660a59152baca6612217af97f
parent4005e0311f4dc951d3e9464ddf2f8f309d9b9a24 (diff)
Redraw interactive direct previews
-rw-r--r--lua/clever_f/acquisition_service.lua1
-rw-r--r--tests/run.lua11
2 files changed, 12 insertions, 0 deletions
diff --git a/lua/clever_f/acquisition_service.lua b/lua/clever_f/acquisition_service.lua
index 0cfd843..0b6a618 100644
--- a/lua/clever_f/acquisition_service.lua
+++ b/lua/clever_f/acquisition_service.lua
@@ -333,6 +333,7 @@ function AcquisitionService:acquire(descriptor, context, position, count, macro_
positions,
window
))
+ record.host:redraw("screen")
end
return request
end
diff --git a/tests/run.lua b/tests/run.lua
index 80294bb..8bc6ba0 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -5001,6 +5001,17 @@ test("Interactive acquisition creates enabled direct previews", function()
same(1, #marker.positions)
same(domain.Position.new(1, 4), marker.positions[1])
same(marker.identity, state:temporary_overlay_identities()[1])
+ list_same({ "screen" }, host:redraws())
+ local create_index
+ local redraw_index
+ for index, operation in ipairs(host:operations()) do
+ if operation.operation == "create_highlight" then
+ create_index = index
+ elseif operation.operation == "redraw" then
+ redraw_index = index
+ end
+ end
+ truthy(redraw_index > create_index)
fresh_sequence_state()
local macro_host = MemoryHost.new({