mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix clearSelection in select all mode
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user