Skip to content

Commit

Permalink
Update src/common/InputHandler.ts
Browse files Browse the repository at this point in the history
Co-authored-by: jerch <[email protected]>
  • Loading branch information
Blashaq and jerch authored Nov 21, 2024
1 parent 9aba07f commit 780f9a3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/common/InputHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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--) {
Expand Down

0 comments on commit 780f9a3

Please sign in to comment.