Fix clearSelection in select all mode

This commit is contained in:
Daniel Imms
2017-06-07 13:48:12 -07:00
parent 2012c8c91d
commit 4405f5e163
2 changed files with 11 additions and 6 deletions
+2 -6
View File
@@ -119,12 +119,9 @@ export class SelectionManager extends EventEmitter {
* are enabled.
*/
public disable() {
this._model.selectionStart = null;
this._model.selectionEnd = null;
this.refresh();
this.clearSelection();
this._buffer.off('trim', this._bufferTrimListener);
this._rowContainer.removeEventListener('mousedown', this._mouseDownListener);
this._removeMouseDownListeners();
}
/**
@@ -193,8 +190,7 @@ export class SelectionManager extends EventEmitter {
* Clears the current terminal selection.
*/
public clearSelection(): void {
this._model.selectionStart = null;
this._model.selectionEnd = null;
this._model.clearSelection();
this._removeMouseDownListeners();
this.refresh();
}
+9
View File
@@ -32,6 +32,15 @@ export class SelectionModel {
) {
}
/**
* Clears the current selection.
*/
public clearSelection(): void {
this.selectionStart = null;
this.selectionEnd = null;
this.isSelectAllActive = false;
}
/**
* The final selection start, taking into consideration select all.
*/