Compare commits

..
Author SHA1 Message Date
Daniel ImmsandCursor c3d35fcea9 fix(InputHandler): clear wrap below scroll margins after column ops
scrollLeft, scrollRight, insertColumns, and deleteColumns set
isWrapped=false on every line inside the scroll margins but left
the first line below scrollBottom unchanged. A soft wrap spanning
the bottom margin and the next row could leave a stale isWrapped
flag on the line below, breaking wrapped string translation.

Clear isWrapped on the buffer line below the bottom margin after
each of these column operations.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 03:36:34 +00:00
Daniel ImmsandCursor b1ecd216f2 fix(InputHandler): clear wrap after EL1 full-line erase
CSI EL Ps=1 erases from the start of the row through the cursor.
When the cursor is in the last column, that clears the entire row but
did not clear isWrapped on the following line. eraseInDisplay Ps=1
already handled this case with ybase-aware indexing.

Mirror that behavior in eraseInLine so soft-wrap chains stay
consistent after erase-to-left at end of line.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 03:36:34 +00:00
Daniel ImmsandCursor ade9a5a091 fix(InputHandler): use ybase when clearing wrap after ED 1
eraseInDisplay Ps=1 clears from the start of the viewport through the
cursor. When the cursor is in the last column, the following line's
isWrapped flag must be cleared because the erased line can no longer
continue a wrapped row.

_eraseInBufferLine already addresses buffer lines with ybase + y, but
the next-line lookup used lines.get(j + 1) without ybase. With
scrollback (ybase > 0), that touched the wrong line and left incorrect
wrap state on the line below the cursor.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 03:36:34 +00:00
3 changed files with 121 additions and 115 deletions
+7
View File
@@ -475,6 +475,13 @@ describe('InputHandler', () => {
inputHandler.eraseInLine(Params.fromArray([1]));
assert.equal(bufferService.buffer.lines.get(2)!.isWrapped, true);
// params[1] - full line erase at last column clears wrap on next line
await resetToBaseState();
bufferService.buffer.y = 1;
bufferService.buffer.x = bufferService.cols - 1;
inputHandler.eraseInLine(Params.fromArray([1]));
assert.equal(bufferService.buffer.lines.get(2)!.isWrapped, false);
// params[2] - erase complete line
await resetToBaseState();
bufferService.buffer.y = 2;
+26 -1
View File
@@ -1202,6 +1202,21 @@ export class InputHandler extends Disposable implements IInputHandler {
}
}
/**
* Scroll-margin column operations clear isWrapped on lines inside the margins.
* Also clear the line below the bottom margin when it still continues a wrap chain.
*/
private _clearWrapBelowScrollMargins(): void {
const rowBelowMargin = this._activeBuffer.scrollBottom + 1;
if (rowBelowMargin >= this._bufferService.rows) {
return;
}
const lineBelow = this._activeBuffer.lines.get(this._activeBuffer.ybase + rowBelowMargin);
if (lineBelow) {
lineBelow.isWrapped = false;
}
}
/**
* CSI Ps J Erase in Display (ED).
* Ps = 0 -> Erase Below (default).
@@ -1246,7 +1261,7 @@ export class InputHandler extends Disposable implements IInputHandler {
this._eraseInBufferLine(j, 0, this._activeBuffer.x + 1, true, respectProtect);
if (this._activeBuffer.x + 1 >= this._bufferService.cols) {
// Deleted entire previous line. This next line can no longer be wrapped.
const nextLine = this._activeBuffer.lines.get(j + 1);
const nextLine = this._activeBuffer.lines.get(this._activeBuffer.ybase + j + 1);
if (nextLine) {
nextLine.isWrapped = false;
}
@@ -1324,6 +1339,12 @@ export class InputHandler extends Disposable implements IInputHandler {
break;
case 1:
this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, false, respectProtect);
if (this._activeBuffer.x + 1 >= this._bufferService.cols) {
const nextLine = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y + 1);
if (nextLine) {
nextLine.isWrapped = false;
}
}
break;
case 2:
this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, true, respectProtect);
@@ -1515,6 +1536,7 @@ export class InputHandler extends Disposable implements IInputHandler {
line.deleteCells(0, param, this._activeBuffer.getNullCell(this._eraseAttrData()));
line.isWrapped = false;
}
this._clearWrapBelowScrollMargins();
this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
return true;
}
@@ -1548,6 +1570,7 @@ export class InputHandler extends Disposable implements IInputHandler {
line.insertCells(0, param, this._activeBuffer.getNullCell(this._eraseAttrData()));
line.isWrapped = false;
}
this._clearWrapBelowScrollMargins();
this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
return true;
}
@@ -1571,6 +1594,7 @@ export class InputHandler extends Disposable implements IInputHandler {
line.insertCells(this._activeBuffer.x, param, this._activeBuffer.getNullCell(this._eraseAttrData()));
line.isWrapped = false;
}
this._clearWrapBelowScrollMargins();
this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
return true;
}
@@ -1594,6 +1618,7 @@ export class InputHandler extends Disposable implements IInputHandler {
line.deleteCells(this._activeBuffer.x, param, this._activeBuffer.getNullCell(this._eraseAttrData()));
line.isWrapped = false;
}
this._clearWrapBelowScrollMargins();
this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
return true;
}
+88 -114
View File
@@ -208,14 +208,14 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\n\rdef\x1b[2;1H\x1b[2P');
await pollFor(ctx.page, () => getLinesAsArray(2), ['bc', 'f']);
});
test('CSI Pm # P - XTPUSHCOLORS: Push current dynamic- and ANSI-palette colors onto stack, xterm', async () => {
await assertNoModeChange('\x1b[#P');
test.skip('CSI Pm # P - XTPUSHCOLORS: Push current dynamic- and ANSI-palette colors onto stack, xterm', async () => {
// TODO: Implement
});
test('CSI Pm # Q - XTPOPCOLORS: Pop stack to set dynamic- and ANSI-palette colors, xterm', async () => {
await assertNoModeChange('\x1b[#Q');
test.skip('CSI Pm # Q - XTPOPCOLORS: Pop stack to set dynamic- and ANSI-palette colors, xterm', async () => {
// TODO: Implement
});
test('CSI # R - XTREPORTCOLORS: Report the current entry on the palette stack, and the number of palettes stored on the stack, using the same form as XTPOPCOLOR (default = 0), xterm', async () => {
await assertNoModeChange('\x1b[#R');
test.skip('CSI # R - XTREPORTCOLORS: Report the current entry on the palette stack, and the number of palettes stored on the stack, using the same form as XTPOPCOLOR (default = 0), xterm', async () => {
// TODO: Implement
});
test('CSI Ps S - SU: Scroll up Ps lines (default = 1), VT420, ECMA-48', async () => {
await ctx.proxy.write('1\r\n2\r\n3\r\n4\r\n5');
@@ -240,11 +240,11 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[2T');
await pollFor(ctx.page, () => getLinesAsArray(5), ['', '', '1', '2', '3']);
});
// Not implemented; the 5-parameter form is currently parsed as SD (scroll down) using the first parameter.
test.skip('CSI Ps ; Ps ; Ps ; Ps ; Ps T - XTHIMOUSE: Initiate highlight mouse tracking (XTHIMOUSE), xterm', async () => {
// TODO: Implement
});
test('CSI > Pm T - XTRMTITLE: Reset title mode features to default value, xterm', async () => {
await assertNoModeChange('\x1b[>T');
test.skip('CSI > Pm T - XTRMTITLE: Reset title mode features to default value, xterm', async () => {
// TODO: Implement
});
test('CSI Ps X - ECH: Erase Ps Character(s) (default = 1)', async () => {
await ctx.proxy.write('abcdef\x1b[1;1H\x1b[X');
@@ -320,8 +320,8 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[c');
await pollFor(ctx.page, () => recordedData, ['\x1b[?1;2c']);
});
test('CSI = Ps c - ', async () => {
await assertNoModeChange('\x1b[=c');
test.skip('CSI = Ps c - ', async () => {
// TODO: Implement
});
test('CSI > Ps c - ', async () => {
await ctx.proxy.write('\x1b[>c');
@@ -491,7 +491,6 @@ test.describe('InputHandler Integration Tests', () => {
await pollFor(ctx.page, () => getLinesAsArray(2), ['1234Y', 'X']);
await ctx.proxy.resize(80, 24);
});
// Mode 45 is XTREVWRAP; covered by the test above.
test.skip('Ps = 4 5 - Enable Graphic Print Color Syntax (DECGPCS), VT340', async () => {
});
test('Ps = 4 6 - Start logging (XTLOGGING), xterm', async () => {
@@ -512,7 +511,6 @@ test.describe('InputHandler Integration Tests', () => {
await pollFor(ctx.page, async () => await ctx.proxy.buffer.active.type, 'normal');
await pollFor(ctx.page, () => getLinesAsArray(1), ['main']);
});
// Mode 47 is the alternate screen buffer; covered by the test above.
test.skip('Ps = 4 7 - Enable Graphic Rotated Print Mode (DECGRPM), VT340', async () => {
});
test('Ps = 6 6 - Application keypad mode (DECNKM), VT320', async () => {
@@ -726,11 +724,11 @@ test.describe('InputHandler Integration Tests', () => {
await assertNoModeChange('\x1b[?2006h');
});
});
test('CSI Ps i - MC: Media Copy', async () => {
await assertNoModeChange('\x1b[0i');
test.skip('CSI Ps i - MC: Media Copy', async () => {
// TODO: Implement
});
test('CSI ? Ps i - MC: Media Copy, DEC-specified', async () => {
await assertNoModeChange('\x1b[?0i');
test.skip('CSI ? Ps i - MC: Media Copy, DEC-specified', async () => {
// TODO: Implement
});
test('CSI Pm l - RM: Reset Mode', async () => {
await ctx.proxy.write('\x1b[4h\x1b[20h');
@@ -858,7 +856,6 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[?45l');
await pollFor(ctx.page, async () => (await ctx.proxy.modes).reverseWraparoundMode, false);
});
// Mode 45 is XTREVWRAP; covered by the test above.
test.skip('Ps = 4 5 - Disable Graphic Print Color Syntax (DECGPCS), VT340.', async () => {
});
test('Ps = 4 6 - Stop logging (XTLOGGING), xterm. This is normally disabled by a compile-time option.', async () => {
@@ -870,7 +867,6 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[?47l');
await pollFor(ctx.page, async () => await ctx.proxy.buffer.active.type, 'normal');
});
// Mode 47 is the alternate screen buffer; covered by the test above.
test.skip('Ps = 4 7 - Disable Graphic Rotated Print Mode (DECGRPM), VT340.', async () => {
});
test('Ps = 6 6 - Numeric keypad mode (DECNKM), VT320.', async () => {
@@ -1402,11 +1398,11 @@ test.describe('InputHandler Integration Tests', () => {
deepStrictEqual(await cell!.getBgColor(), 0x123456);
});
});
test('CSI > Pp [; Pv] m - XTMODKEYS: Set/reset key modifier options, xterm', async () => {
await assertNoModeChange('\x1b[>2;1m');
test.skip('CSI > Pp [; Pv] m - XTMODKEYS: Set/reset key modifier options, xterm', () => {
// TODO: Implement
});
test('CSI ? Pp m - XTQMODKEYS: Query key modifier options, xterm', async () => {
await assertNoModeChange('\x1b[?27m');
test.skip('CSI ? Pp m - XTQMODKEYS: Query key modifier options, xterm', () => {
// TODO: Implement
});
test.describe('CSI Ps n - DSR: Device Status Report', () => {
test('Status Report - CSI 5 n', async () => {
@@ -1434,8 +1430,8 @@ test.describe('InputHandler Integration Tests', () => {
deepStrictEqual(recordedData, ['\x1b[?3;4R']);
});
});
test('CSI > Ps n - Disable key modifier options, xterm', async () => {
await assertNoModeChange('\x1b[>0n');
test.skip('CSI > Ps n - Disable key modifier options, xterm', () => {
// TODO: Implement
});
test.describe('CSI ? Ps n - DECDSR: Device Status Report (DEC-specific)', () => {
test('Color Scheme Query - CSI ? 996 n (dark theme)', async () => {
@@ -1462,8 +1458,8 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.page.evaluate(`window.term.options.vtExtensions = { colorSchemeQuery: true }`);
});
});
test('CSI > Ps p - XTSMPOINTER: Set resource value pointerMode, xterm', async () => {
await assertNoModeChange('\x1b[>3p');
test.skip('CSI > Ps p - XTSMPOINTER: Set resource value pointerMode, xterm', () => {
// TODO: Implement
});
test('CSI ! p - DECSTR: Soft terminal reset, VT220 and up.', async () => {
const rows = await ctx.proxy.rows;
@@ -1475,8 +1471,8 @@ test.describe('InputHandler Integration Tests', () => {
await pollFor(ctx.page, async () => (await ctx.proxy.modes).originMode, false);
await pollFor(ctx.page, () => ctx.page.evaluate(`({ top: window.term._core._bufferService.buffer.scrollTop, bottom: window.term._core._bufferService.buffer.scrollBottom })`), { top: 0, bottom: rows - 1 });
});
test('CSI Pl ; Pc " p - DECSCL: Set conformance level, VT220 and up.', async () => {
await assertNoModeChange('\x1b[61;0"p');
test.skip('CSI Pl ; Pc " p - DECSCL: Set conformance level, VT220 and up.', () => {
// TODO: Implement
});
test('CSI Ps $ p - DECRQM: Request ANSI mode', async () => {
await ctx.proxy.write('\x1b[4h');
@@ -1503,8 +1499,8 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[?1$p');
deepStrictEqual(recordedData, ['\x1b[?1;2$y']);
});
test('CSI [Pm] # p - Push video attributes onto stack (XTPUSHSGR), xterm. This is an alias for CSI # { , used to work around language limitations of C#.', async () => {
await assertNoModeChange('\x1b[#p');
test.skip('CSI [Pm] # p - Push video attributes onto stack (XTPUSHSGR), xterm. This is an alias for CSI # { , used to work around language limitations of C#.', async () => {
// TODO: Implement
});
test('CSI > Ps q - Report xterm name and version (XTVERSION).', async () => {
await ctx.proxy.write('\x1b[>q');
@@ -1512,8 +1508,8 @@ test.describe('InputHandler Integration Tests', () => {
ok(recordedData[0].startsWith('\x1bP>|xterm.js('));
ok(recordedData[0].endsWith('\x1b\\'));
});
test('CSI Ps q - Load LEDs (DECLL), VT100.', async () => {
await assertNoModeChange('\x1b[0q');
test.skip('CSI Ps q - Load LEDs (DECLL), VT100.', async () => {
// TODO: Implement
});
test('CSI Ps SP q - Set cursor style (DECSCUSR), VT520.', async () => {
const getCursorMode = async () => ctx.proxy.core.evaluate(([core]) => {
@@ -1544,8 +1540,8 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[1;1H\x1b[?2K');
await pollFor(ctx.page, () => getLinesAsArray(1), ['PROT']);
});
test('CSI # q - Pop video attributes from stack (XTPOPSGR), xterm.', async () => {
await assertNoModeChange('\x1b[#q');
test.skip('CSI # q - Pop video attributes from stack (XTPOPSGR), xterm.', async () => {
// TODO: Implement
});
test('CSI Ps ; Ps r - Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM), VT100.', async () => {
const rows = await ctx.proxy.rows;
@@ -1554,11 +1550,11 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[r');
await pollFor(ctx.page, () => ctx.page.evaluate(`({ top: window.term._core._bufferService.buffer.scrollTop, bottom: window.term._core._bufferService.buffer.scrollBottom })`), { top: 0, bottom: rows - 1 });
});
test('CSI ? Pm r - Restore DEC Private Mode Values (XTRESTORE), xterm.', async () => {
await assertNoModeChange('\x1b[?1r');
test.skip('CSI ? Pm r - Restore DEC Private Mode Values (XTRESTORE), xterm.', async () => {
// TODO: Implement
});
test('CSI Pt ; Pl ; Pb ; Pr ; Pm $ r - Change Attributes in Rectangular Area (DECCARA), VT400 and up.', async () => {
await assertNoModeChange('\x1b[1;1;1;1;0$r');
test.skip('CSI Pt ; Pl ; Pb ; Pr ; Pm $ r - Change Attributes in Rectangular Area (DECCARA), VT400 and up.', async () => {
// TODO: Implement
});
test('CSI s - Save cursor, available only when DECLRMM is disabled (SCOSC, also ANSI.SYS).', async () => {
await ctx.proxy.write('\x1b[3;4H');
@@ -1567,23 +1563,23 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[u');
await pollFor(ctx.page, () => getCursor(), { col: 3, row: 2 });
});
// Parsed as SCOSC (CSI s) today; keep skipped until DECSLRM is implemented.
test.skip('CSI Pl ; Pr s - Set left and right margins (DECSLRM), VT420 and up.', async () => {
// TODO: Implement
});
test('CSI > Ps s - Set/reset shift-escape options (XTSHIFTESCAPE), xterm.', async () => {
await assertNoModeChange('\x1b[>0s');
test.skip('CSI > Ps s - Set/reset shift-escape options (XTSHIFTESCAPE), xterm.', async () => {
// TODO: Implement
});
test('CSI ? Pm s - Save DEC Private Mode Values (XTSAVE), xterm. Ps values are the same as for DECSET.', async () => {
await assertNoModeChange('\x1b[?1s');
test.skip('CSI ? Pm s - Save DEC Private Mode Values (XTSAVE), xterm. Ps values are the same as for DECSET.', async () => {
// TODO: Implement
});
test('CSI > Pm t - This xterm control sets one or more features of the title modes (XTSMTITLE), xterm.', async () => {
await assertNoModeChange('\x1b[>3t');
test.skip('CSI > Pm t - This xterm control sets one or more features of the title modes (XTSMTITLE), xterm.', async () => {
// TODO: Implement
});
test('CSI Ps SP t - Set warning-bell volume (DECSWBV), VT520.', async () => {
await assertNoModeChange('\x1b[1 t');
test.skip('CSI Ps SP t - Set warning-bell volume (DECSWBV), VT520.', async () => {
// TODO: Implement
});
test('CSI Pt ; Pl ; Pb ; Pr ; Pm $ t - Reverse Attributes in Rectangular Area (DECRARA), VT400 and up.', async () => {
await assertNoModeChange('\x1b[1;1;1;1;0$t');
test.skip('CSI Pt ; Pl ; Pb ; Pr ; Pm $ t - Reverse Attributes in Rectangular Area (DECRARA), VT400 and up.', async () => {
// TODO: Implement
});
test('CSI u - Restore cursor (SCORC, also ANSI.SYS).', async () => {
await ctx.proxy.write('\x1b[4;6H');
@@ -1592,62 +1588,62 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[u');
await pollFor(ctx.page, () => getCursor(), { col: 5, row: 3 });
});
test('CSI Ps SP u - Set margin-bell volume (DECSMBV), VT520.', async () => {
await assertNoModeChange('\x1b[1 u');
test.skip('CSI Ps SP u - Set margin-bell volume (DECSMBV), VT520.', async () => {
// TODO: Implement
});
test('CSI Pt ; Pl ; Pb ; Pr ; Pp ; Pt ; Pl ; Pp $ v - Copy Rectangular Area (DECCRA), VT400 and up.', async () => {
await assertNoModeChange('\x1b[1;1;1;1;1;1;1;1$v');
test.skip('CSI Pt ; Pl ; Pb ; Pr ; Pp ; Pt ; Pl ; Pp $ v - Copy Rectangular Area (DECCRA), VT400 and up.', async () => {
// TODO: Implement
});
test('CSI Ps $ w - Request presentation state report (DECRQPSR), VT320 and up.', async () => {
await assertNoModeChange('\x1b[1$w');
test.skip('CSI Ps $ w - Request presentation state report (DECRQPSR), VT320 and up.', async () => {
// TODO: Implement
});
test('CSI Pt ; Pl ; Pb ; Pr \' w - Enable Filter Rectangle (DECEFR), VT420 and up.', async () => {
await assertNoModeChange('\x1b[1;1;1;1\'w');
test.skip('CSI Pt ; Pl ; Pb ; Pr \' w - Enable Filter Rectangle (DECEFR), VT420 and up.', async () => {
// TODO: Implement
});
test('CSI Ps x - Request Terminal Parameters (DECREQTPARM).', async () => {
await assertNoModeChange('\x1b[0x');
test.skip('CSI Ps x - Request Terminal Parameters (DECREQTPARM).', async () => {
// TODO: Implement
});
test('CSI Ps * x - Select Attribute Change Extent (DECSACE), VT420 and up.', async () => {
await assertNoModeChange('\x1b[0*x');
test.skip('CSI Ps * x - Select Attribute Change Extent (DECSACE), VT420 and up.', async () => {
// TODO: Implement
});
test('CSI Pc ; Pt ; Pl ; Pb ; Pr $ x - Fill Rectangular Area (DECFRA), VT420 and up.', async () => {
await assertNoModeChange('\x1b[0;0;1;1;1$x');
test.skip('CSI Pc ; Pt ; Pl ; Pb ; Pr $ x - Fill Rectangular Area (DECFRA), VT420 and up.', async () => {
// TODO: Implement
});
test('CSI Ps # y - Select checksum extension (XTCHECKSUM), xterm.', async () => {
await assertNoModeChange('\x1b[0#y');
test.skip('CSI Ps # y - Select checksum extension (XTCHECKSUM), xterm.', async () => {
// TODO: Implement
});
test('CSI Pi ; Pg ; Pt ; Pl ; Pb ; Pr * y - Request Checksum of Rectangular Area (DECRQCRA), VT420 and up.', async () => {
await assertNoModeChange('\x1b[0;0;1;1;1*y');
test.skip('CSI Pi ; Pg ; Pt ; Pl ; Pb ; Pr * y - Request Checksum of Rectangular Area (DECRQCRA), VT420 and up.', async () => {
// TODO: Implement
});
test('CSI Ps ; Pu \' z - Enable Locator Reporting (DECELR).', async () => {
await assertNoModeChange('\x1b[0\'z');
test.skip('CSI Ps ; Pu \' z - Enable Locator Reporting (DECELR).', async () => {
// TODO: Implement
});
test('CSI Pt ; Pl ; Pb ; Pr $ z - Erase Rectangular Area (DECERA), VT400 and up.', async () => {
await assertNoModeChange('\x1b[1;1;1;1$z');
test.skip('CSI Pt ; Pl ; Pb ; Pr $ z - Erase Rectangular Area (DECERA), VT400 and up.', async () => {
// TODO: Implement
});
test('CSI Pm \' { - Select Locator Events (DECSLE).', async () => {
await assertNoModeChange('\x1b[0\'{');
test.skip('CSI Pm \' { - Select Locator Events (DECSLE).', async () => {
// TODO: Implement
});
test('CSI [Pm] # { Push video attributes onto stack (XTPUSHSGR), xterm.', async () => {
await assertNoModeChange('\x1b[#{');
test.skip('CSI [Pm] # { Push video attributes onto stack (XTPUSHSGR), xterm.', async () => {
// TODO: Implement
});
test('CSI Pt ; Pl ; Pb ; Pr $ { - Selective Erase Rectangular Area (DECSERA), VT400 and up.', async () => {
await assertNoModeChange('\x1b[1;1;1;1${');
test.skip('CSI Pt ; Pl ; Pb ; Pr $ { - Selective Erase Rectangular Area (DECSERA), VT400 and up.', async () => {
// TODO: Implement
});
test('CSI Pt ; Pl ; Pb ; Pr # | - Report selected graphic rendition (XTREPORTSGR), xterm.', async () => {
await assertNoModeChange('\x1b[1;1;1;1#|');
test.skip('CSI Pt ; Pl ; Pb ; Pr # | - Report selected graphic rendition (XTREPORTSGR), xterm.', async () => {
// TODO: Implement
});
test('CSI Ps $ | - Select columns per page (DECSCPP), VT340.', async () => {
await assertNoModeChange('\x1b[80$|');
test.skip('CSI Ps $ | - Select columns per page (DECSCPP), VT340.', async () => {
// TODO: Implement
});
test('CSI Ps \' | - Request Locator Position (DECRQLP).', async () => {
await assertNoModeChange('\x1b[0\'|');
test.skip('CSI Ps \' | - Request Locator Position (DECRQLP).', async () => {
// TODO: Implement
});
test('CSI Ps * | - Select number of lines per screen (DECSNLS), VT420 and up.', async () => {
await assertNoModeChange('\x1b[24*|');
test.skip('CSI Ps * | - Select number of lines per screen (DECSNLS), VT420 and up.', async () => {
// TODO: Implement
});
test('CSI # } - Pop video attributes from stack (XTPOPSGR), xterm.', async () => {
await assertNoModeChange('\x1b[#}');
test.skip('CSI # } - Pop video attributes from stack (XTPOPSGR), xterm.', async () => {
// TODO: Implement
});
test('CSI Ps \' } - Insert Ps Column(s) (default = 1) (DECIC), VT420 and up.', async () => {
await ctx.proxy.resize(5, 5);
@@ -1656,8 +1652,8 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[\'}');
await pollFor(ctx.page, () => getLinesAsArray(6), ['12345', '12 34', '12 34', '12 34', '12 34', '12 34']);
});
test('CSI Ps $ } - Select active status display (DECSASD), VT320 and up.', async () => {
await assertNoModeChange('\x1b[0$}');
test.skip('CSI Ps $ } - Select active status display (DECSASD), VT320 and up.', async () => {
// TODO: Implement
});
test('CSI Ps \' ~ - Delete Ps Column(s) (default = 1) (DECDC), VT420 and up.', async () => {
await ctx.proxy.resize(5, 5);
@@ -1666,8 +1662,8 @@ test.describe('InputHandler Integration Tests', () => {
await ctx.proxy.write('\x1b[\'~');
await pollFor(ctx.page, () => getLinesAsArray(6), ['12345', '1245', '1245', '1245', '1245', '1245']);
});
test('CSI Ps $ ~ - Select status line type (DECSSDT), VT320 and up.', async () => {
await assertNoModeChange('\x1b[0$~');
test.skip('CSI Ps $ ~ - Select status line type (DECSSDT), VT320 and up.', async () => {
// TODO: Implement
});
test.describe('CSI Ps ; Ps ; Ps t - Window Options', () => {
test('should be disabled by default', async () => {
@@ -1690,28 +1686,6 @@ test.describe('InputHandler Integration Tests', () => {
const d = await getDimensions();
deepStrictEqual(recordedData, [`\x1b[6;${d.cellHeight};${d.cellWidth}t`]);
});
test('18 - GetWinSizeChars', async () => {
await ctx.proxy.setOption('windowOptions', { getWinSizeChars: true });
await ctx.proxy.write('\x1b[18t');
deepStrictEqual(recordedData, [`\x1b[8;${await ctx.proxy.rows};${await ctx.proxy.cols}t`]);
});
test('22/23 - PushTitle/PopTitle', async () => {
const titles: string[] = [];
const titleDisposable = ctx.proxy.onTitleChange(t => titles.push(t));
await ctx.proxy.setOption('windowOptions', { pushTitle: true, popTitle: true });
await ctx.proxy.write('\x1b]0;1\x07');
await ctx.proxy.write('\x1b[22t');
await ctx.proxy.write('\x1b]0;2\x07');
await ctx.proxy.write('\x1b[22t');
await ctx.proxy.write('\x1b]0;3\x07');
await ctx.proxy.write('\x1b[22t');
await pollFor(ctx.page, () => titles, ['1', '2', '3']);
await ctx.proxy.write('\x1b[23t');
await ctx.proxy.write('\x1b[23t');
await ctx.proxy.write('\x1b[23t');
await pollFor(ctx.page, () => titles, ['1', '2', '3', '3', '2', '1']);
titleDisposable.dispose();
});
});
});