Skip to content

Commit 780f9a3

Browse files
Blashaqjerch
andauthored
Update src/common/InputHandler.ts
Co-authored-by: jerch <jerch@rockborn.de>
1 parent 9aba07f commit 780f9a3

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/common/InputHandler.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,15 +1221,12 @@ export class InputHandler extends Disposable implements IInputHandler {
12211221
break;
12221222
case 2:
12231223
if (this._optionsService.rawOptions.scrollOnDisplayErase) {
1224-
let fouldLastLineToKeep = false;
12251224
j = this._bufferService.rows;
1226-
const x = this._activeBuffer.getBlankLine(this._eraseAttrData());
1227-
while (j > 0 && !fouldLastLineToKeep) {
1228-
j--;
1225+
this._dirtyRowTracker.markRangeDirty(0, j - 1);
1226+
while (j--) {
12291227
const currentLine = this._activeBuffer.lines.get(this._activeBuffer.ybase + j);
1230-
if (currentLine?.translateToString() !== x.translateToString()) {
1231-
fouldLastLineToKeep = true;
1232-
this._dirtyRowTracker.markRangeDirty(0, j);
1228+
if (currentLine?.getTrimmedLength()) {
1229+
break;
12331230
}
12341231
}
12351232
for (; j >= 0; j--) {

0 commit comments

Comments
 (0)