Clean up
This commit is contained in:
@@ -311,13 +311,11 @@ export class Buffer implements IBuffer {
|
||||
const marker = new Marker(y);
|
||||
this.markers.push(marker);
|
||||
marker.disposables.push(this._lines.addDisposableListener('trim', amount => {
|
||||
console.log('trim!' + amount);
|
||||
marker.line -= amount;
|
||||
// The marker should be disposed when the line is trimmed from the buffer
|
||||
if (marker.line < 0) {
|
||||
marker.dispose();
|
||||
}
|
||||
// TODO: handle splice?
|
||||
}));
|
||||
marker.on('dispose', () => this._removeMarker(marker));
|
||||
return marker;
|
||||
|
||||
Reference in New Issue
Block a user