use splice instead of filter

This commit is contained in:
meganrogge
2022-02-18 17:50:12 -06:00
parent 1efdc2e4ce
commit f839a0da8b
+1 -1
View File
@@ -590,8 +590,8 @@ export class Buffer implements IBuffer {
if (y) {
for (const marker of this.markers.filter(m => m.line === y)) {
marker.dispose();
this.markers.splice(this.markers.indexOf(marker), 1);
}
this.markers = this.markers.filter(m => m.line !== y);
} else {
for (const marker of this.markers) {
marker.dispose();