Merge pull request #3649 from meganrogge/master

on buffer clear, update markers array once each has been disposed of
This commit is contained in:
Megan Rogge
2022-02-18 17:58:50 -06:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
-1
View File
@@ -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;
} }
+2
View File
@@ -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;
} }