Skip to content

Commit 5fa6325

Browse files
authored
Merge pull request #5462 from Tyriar/tyriar/deprecated
Remove deprecated windowsMode and fastScrollModifier
2 parents d1c50c1 + 3571d1f commit 5fa6325

File tree

2 files changed

+0
-67
lines changed

2 files changed

+0
-67
lines changed

src/browser/Terminal.test.ts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,47 +1079,6 @@ describe('Terminal', () => {
10791079
assert.equal(windowsModeTerminal.buffer.lines.get(2)!.isWrapped, false);
10801080
});
10811081
});
1082-
describe('Windows Mode', () => {
1083-
it('should mark lines as wrapped when the line ends in a non-null character after a LF', async () => {
1084-
const data = [
1085-
'aaaaaaaaaa\n\r', // cannot wrap as it's the first
1086-
'aaaaaaaaa\n\r', // wrapped (windows mode only)
1087-
'aaaaaaaaa' // not wrapped
1088-
];
1089-
1090-
const normalTerminal = new TestTerminal({ rows: 5, cols: 10, windowsMode: false });
1091-
await normalTerminal.writeP(data.join(''));
1092-
assert.equal(normalTerminal.buffer.lines.get(0)!.isWrapped, false);
1093-
assert.equal(normalTerminal.buffer.lines.get(1)!.isWrapped, false);
1094-
assert.equal(normalTerminal.buffer.lines.get(2)!.isWrapped, false);
1095-
1096-
const windowsModeTerminal = new TestTerminal({ rows: 5, cols: 10, windowsMode: true });
1097-
await windowsModeTerminal.writeP(data.join(''));
1098-
assert.equal(windowsModeTerminal.buffer.lines.get(0)!.isWrapped, false);
1099-
assert.equal(windowsModeTerminal.buffer.lines.get(1)!.isWrapped, true, 'This line should wrap in Windows mode as the previous line ends in a non-null character');
1100-
assert.equal(windowsModeTerminal.buffer.lines.get(2)!.isWrapped, false);
1101-
});
1102-
1103-
it('should mark lines as wrapped when the line ends in a non-null character after a CUP', async () => {
1104-
const data = [
1105-
'aaaaaaaaaa\x1b[2;1H', // cannot wrap as it's the first
1106-
'aaaaaaaaa\x1b[3;1H', // wrapped (windows mode only)
1107-
'aaaaaaaaa' // not wrapped
1108-
];
1109-
1110-
const normalTerminal = new TestTerminal({ rows: 5, cols: 10, windowsMode: false });
1111-
await normalTerminal.writeP(data.join(''));
1112-
assert.equal(normalTerminal.buffer.lines.get(0)!.isWrapped, false);
1113-
assert.equal(normalTerminal.buffer.lines.get(1)!.isWrapped, false);
1114-
assert.equal(normalTerminal.buffer.lines.get(2)!.isWrapped, false);
1115-
1116-
const windowsModeTerminal = new TestTerminal({ rows: 5, cols: 10, windowsMode: true });
1117-
await windowsModeTerminal.writeP(data.join(''));
1118-
assert.equal(windowsModeTerminal.buffer.lines.get(0)!.isWrapped, false);
1119-
assert.equal(windowsModeTerminal.buffer.lines.get(1)!.isWrapped, true, 'This line should wrap in Windows mode as the previous line ends in a non-null character');
1120-
assert.equal(windowsModeTerminal.buffer.lines.get(2)!.isWrapped, false);
1121-
});
1122-
});
11231082
it('convertEol setting', async () => {
11241083
// not converting
11251084
const termNotConverting = new TestTerminal({ cols: 15, rows: 10 });

typings/xterm.d.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,6 @@ declare module '@xterm/xterm' {
107107
*/
108108
drawBoldTextInBrightColors?: boolean;
109109

110-
/**
111-
* The modifier key hold to multiply scroll speed.
112-
* @deprecated This option is no longer available and will always use alt.
113-
* Setting this will be ignored.
114-
*/
115-
fastScrollModifier?: 'none' | 'alt' | 'ctrl' | 'shift';
116-
117110
/**
118111
* The scroll speed multiplier used for fast scrolling when `Alt` is held.
119112
*/
@@ -291,25 +284,6 @@ declare module '@xterm/xterm' {
291284
*/
292285
theme?: ITheme;
293286

294-
/**
295-
* Whether "Windows mode" is enabled. Because Windows backends winpty and
296-
* conpty operate by doing line wrapping on their side, xterm.js does not
297-
* have access to wrapped lines. When Windows mode is enabled the following
298-
* changes will be in effect:
299-
*
300-
* - Reflow is disabled.
301-
* - Lines are assumed to be wrapped if the last character of the line is
302-
* not whitespace.
303-
*
304-
* When using conpty on Windows 11 version >= 21376, it is recommended to
305-
* disable this because native text wrapping sequences are output correctly
306-
* thanks to https://github.com/microsoft/terminal/issues/405
307-
*
308-
* @deprecated Use {@link windowsPty}. This value will be ignored if
309-
* windowsPty is set.
310-
*/
311-
windowsMode?: boolean;
312-
313287
/**
314288
* Compatibility information when the pty is known to be hosted on Windows.
315289
* Setting this will turn on certain heuristics/workarounds depending on the

0 commit comments

Comments
 (0)