mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Update src/common/InputHandler.ts
Co-authored-by: jerch <jerch@rockborn.de>
This commit is contained in:
@@ -1221,15 +1221,12 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
break;
|
||||
case 2:
|
||||
if (this._optionsService.rawOptions.scrollOnDisplayErase) {
|
||||
let fouldLastLineToKeep = false;
|
||||
j = this._bufferService.rows;
|
||||
const x = this._activeBuffer.getBlankLine(this._eraseAttrData());
|
||||
while (j > 0 && !fouldLastLineToKeep) {
|
||||
j--;
|
||||
this._dirtyRowTracker.markRangeDirty(0, j - 1);
|
||||
while (j--) {
|
||||
const currentLine = this._activeBuffer.lines.get(this._activeBuffer.ybase + j);
|
||||
if (currentLine?.translateToString() !== x.translateToString()) {
|
||||
fouldLastLineToKeep = true;
|
||||
this._dirtyRowTracker.markRangeDirty(0, j);
|
||||
if (currentLine?.getTrimmedLength()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (; j >= 0; j--) {
|
||||
|
||||
Reference in New Issue
Block a user