Fix exception on resize during write

Fixes #5588
This commit is contained in:
Daniel Imms
2026-01-08 18:03:42 -08:00
parent 729a670043
commit 16a13f8504
3 changed files with 28 additions and 2 deletions
+10
View File
@@ -402,6 +402,16 @@ test.describe('API Integration Tests', () => {
await pollFor(ctx.page, `window.calls`, [[10, 5], [20, 15]]);
});
test('resize during write should not throw', async () => {
await openTerminal(ctx, { rows: 50, cols: 80 });
const largeData = 'x'.repeat(10000);
await ctx.proxy.write(largeData);
await ctx.proxy.resize(80, 10);
await ctx.proxy.write(largeData);
await ctx.proxy.resize(80, 5);
await ctx.proxy.write(largeData);
});
test('onTitleChange', async () => {
await openTerminal(ctx);
await ctx.page.evaluate(`