Add hasSelection public API
This commit is contained in:
@@ -145,6 +145,13 @@ export class SelectionManager extends EventEmitter {
|
||||
this._buffer = buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether there is an active text selection.
|
||||
*/
|
||||
public get hasSelection(): boolean {
|
||||
return !!this._model.finalSelectionStart && !!this._model.finalSelectionEnd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the text currently selected.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user