fix #3641
This commit is contained in:
@@ -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