Add clearSelection API
This commit is contained in:
@@ -180,6 +180,16 @@ export class SelectionManager extends EventEmitter {
|
||||
return result.join('\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current terminal selection.
|
||||
*/
|
||||
public clearSelection(): void {
|
||||
this._model.selectionStart = null;
|
||||
this._model.selectionEnd = null;
|
||||
this._removeMouseDownListeners();
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates a buffer line to a string, with optional start and end columns.
|
||||
* Wide characters will count as two columns in the resulting string. This
|
||||
|
||||
Reference in New Issue
Block a user