summaryrefslogtreecommitdiff
path: root/tests/run.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run.lua')
-rw-r--r--tests/run.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index b337b10..03e1c2d 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -6009,6 +6009,42 @@ test("Persistent feedback accepts every eligible mode context", function()
end
end)
+test("Operator acquisition keeps feedback temporary", function()
+ local state, transitions = fresh_sequence_state()
+ local host = MemoryHost.new({
+ buffer_lines = { "abc" },
+ configuration = {
+ mark_cursor = true,
+ mark_direct = true,
+ mark_char = true,
+ },
+ input_packets = { { kind = "text", text = "b" } },
+ })
+ local feedback = feedback_service.new({
+ host = host,
+ transitions = transitions,
+ })
+ local service = acquisition_service.new({
+ host = host,
+ transitions = transitions,
+ feedback = feedback,
+ })
+ local result = service:acquire(
+ "f",
+ "no",
+ domain.Position.new(1, 1),
+ nil,
+ nil
+ )
+
+ same(nil, result.persistent_feedback_request)
+ truthy(service:last_temporary_scope().cursor_marker ~= nil)
+ truthy(service:last_temporary_scope().direct_marker ~= nil)
+ same(0, #state.target_overlays)
+ same(0, #state.temporary_overlays)
+ same(0, map_size(host:highlights()))
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then