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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user