diff options
Diffstat (limited to 'tests/run.lua')
| -rw-r--r-- | tests/run.lua | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 87f54b3..9de914f 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -4941,6 +4941,41 @@ test("Acquisition creates cursor markers only when enabled", function() same(nil, disabled:last_temporary_scope().cursor_marker) end) +test("Interactive acquisition redraws after cursor marker creation", function() + fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { mark_cursor = true }, + }) + local service = acquisition_service.new(host) + service:acquire("f", "n", domain.Position.new(1, 1), nil, nil) + + 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(create_index ~= nil) + truthy(redraw_index > create_index) + list_same({ "screen" }, host:redraws()) + + fresh_sequence_state() + local macro_host = MemoryHost.new({ + configuration = { mark_cursor = true }, + }) + acquisition_service.new(macro_host):acquire( + "f", + "n", + domain.Position.new(1, 1), + nil, + domain.MacroState.new("q") + ) + same(0, #macro_host:redraws()) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
