clearAllMarkers
This commit is contained in:
@@ -71,4 +71,17 @@ describe('BufferSet', () => {
|
|||||||
assert.equal(bufferSet.active.y, 10);
|
assert.equal(bufferSet.active.y, 10);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('markers', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should clear the markers when the buffer is switched', () => {
|
||||||
|
bufferSet.activateAltBuffer();
|
||||||
|
bufferSet.alt.addMarker(1);
|
||||||
|
assert.equal(bufferSet.alt.markers.length, 1);
|
||||||
|
bufferSet.activateNormalBuffer();
|
||||||
|
assert.equal(bufferSet.alt.markers.length, 0);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ export class BufferSet extends Disposable implements IBufferSet {
|
|||||||
// The alt buffer should always be cleared when we switch to the normal
|
// The alt buffer should always be cleared when we switch to the normal
|
||||||
// buffer. This frees up memory since the alt buffer should always be new
|
// buffer. This frees up memory since the alt buffer should always be new
|
||||||
// when activated.
|
// when activated.
|
||||||
|
this._alt.clearAllMarkers();
|
||||||
this._alt.clear();
|
this._alt.clear();
|
||||||
this._activeBuffer = this._normal;
|
this._activeBuffer = this._normal;
|
||||||
this._onBufferActivate.fire({
|
this._onBufferActivate.fire({
|
||||||
|
|||||||
Reference in New Issue
Block a user