Merge pull request #3649 from meganrogge/master
on buffer clear, update markers array once each has been disposed of
This commit is contained in:
@@ -1218,7 +1218,6 @@ export class InputHandler extends Disposable implements IInputHandler {
|
|||||||
this._activeBuffer.getNullCell(this._eraseAttrData()),
|
this._activeBuffer.getNullCell(this._eraseAttrData()),
|
||||||
this._eraseAttrData()
|
this._eraseAttrData()
|
||||||
);
|
);
|
||||||
this._bufferService.buffer.clearMarkers(y);
|
|
||||||
if (clearWrap) {
|
if (clearWrap) {
|
||||||
line.isWrapped = false;
|
line.isWrapped = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -590,11 +590,13 @@ export class Buffer implements IBuffer {
|
|||||||
if (y) {
|
if (y) {
|
||||||
for (const marker of this.markers.filter(m => m.line === y)) {
|
for (const marker of this.markers.filter(m => m.line === y)) {
|
||||||
marker.dispose();
|
marker.dispose();
|
||||||
|
this.markers.splice(this.markers.indexOf(marker), 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const marker of this.markers) {
|
for (const marker of this.markers) {
|
||||||
marker.dispose();
|
marker.dispose();
|
||||||
}
|
}
|
||||||
|
this.markers = [];
|
||||||
}
|
}
|
||||||
this._isClearing = false;
|
this._isClearing = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user