mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #588 from Tyriar/587_csi_3_J
Implement CSI 3 J - Erase saved lines
This commit is contained in:
+7
-1
@@ -385,7 +385,13 @@ export class InputHandler implements IInputHandler {
|
||||
while (j--) this._terminal.eraseLine(j);
|
||||
break;
|
||||
case 3:
|
||||
; // no saved lines
|
||||
// Clear scrollback (everything not in viewport)
|
||||
const scrollBackSize = this._terminal.lines.length - this._terminal.rows;
|
||||
if (scrollBackSize > 0) {
|
||||
this._terminal.lines.trimStart(scrollBackSize);
|
||||
this._terminal.ybase = Math.max(this._terminal.ybase - scrollBackSize, 0);
|
||||
this._terminal.ydisp = Math.max(this._terminal.ydisp - scrollBackSize, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user