File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 -- ) {
You can’t perform that action at this time.
0 commit comments