Skip to content

Commit b48c97d

Browse files
committed
test(replay): 0 delay ReplayAll
1 parent e50852a commit b48c97d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/manual/streaming_renderer_replay.lua

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ function M.replay_all(delay_ms)
127127
M.timer = nil
128128
end
129129

130+
if delay_ms == 0 then
131+
M.replay_next(#M.events)
132+
return
133+
end
134+
130135
M.timer = vim.loop.new_timer()
131136
M.timer:start(
132137
0,
@@ -193,7 +198,7 @@ function M.normalize_namespace_ids(extmarks)
193198
return helpers.normalize_namespace_ids(extmarks)
194199
end
195200

196-
function M.capture_snapshot(filename)
201+
function M.save_output(filename)
197202
if not state.windows or not state.windows.output_buf then
198203
vim.notify('No output buffer available', vim.log.levels.ERROR)
199204
return nil
@@ -331,8 +336,8 @@ function M.start(opts)
331336
vim.notify('No filename specified and no file loaded', vim.log.levels.ERROR)
332337
return
333338
end
334-
M.capture_snapshot(filename)
335-
end, { nargs = '?', desc = 'Capture output snapshot', complete = 'file' })
339+
M.save_output(filename)
340+
end, { nargs = '?', desc = 'Save output snapshot', complete = 'file' })
336341

337342
vim.api.nvim_create_user_command('ReplayHeadless', function()
338343
M.headless_mode = true

0 commit comments

Comments
 (0)