fix #3641
This commit is contained in:
@@ -1218,6 +1218,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
this._activeBuffer.getNullCell(this._eraseAttrData()),
|
||||
this._eraseAttrData()
|
||||
);
|
||||
this._bufferService.buffer.clearMarkers(y);
|
||||
if (clearWrap) {
|
||||
line.isWrapped = false;
|
||||
}
|
||||
@@ -1232,6 +1233,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
|
||||
line.fill(this._activeBuffer.getNullCell(this._eraseAttrData()));
|
||||
line.isWrapped = false;
|
||||
this._bufferService.buffer.clearMarkers(y);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1292,7 +1294,6 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
this._resetBufferLine(j);
|
||||
}
|
||||
this._dirtyRowService.markDirty(0);
|
||||
this._bufferService.buffer.clearMarkers();
|
||||
break;
|
||||
case 3:
|
||||
// Clear scrollback (everything not in viewport)
|
||||
|
||||
@@ -585,12 +585,17 @@ export class Buffer implements IBuffer {
|
||||
return x >= this._cols ? this._cols - 1 : x < 0 ? 0 : x;
|
||||
}
|
||||
|
||||
public clearMarkers(): void {
|
||||
public clearMarkers(y?: number): void {
|
||||
this._isClearing = true;
|
||||
for (const marker of this.markers) {
|
||||
marker.dispose();
|
||||
}
|
||||
this.markers = [];
|
||||
if (y) {
|
||||
for (const marker of this.markers.filter(m => m.line === y)) {
|
||||
marker.dispose();
|
||||
}
|
||||
} else {
|
||||
for (const marker of this.markers) {
|
||||
marker.dispose();
|
||||
}
|
||||
}
|
||||
this._isClearing = false;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -45,7 +45,7 @@ export interface IBuffer {
|
||||
getNullCell(attr?: IAttributeData): ICellData;
|
||||
getWhitespaceCell(attr?: IAttributeData): ICellData;
|
||||
addMarker(y: number): IMarker;
|
||||
clearMarkers(): void;
|
||||
clearMarkers(y?: number): void;
|
||||
}
|
||||
|
||||
export interface IBufferSet extends IDisposable {
|
||||
|
||||
Reference in New Issue
Block a user