Make sure selection manager is available (only after open() was called)

This commit is contained in:
mofux
2017-07-14 18:40:32 +03:00
committed by Paris Kasidiaris
parent 1cc0d43aa4
commit 1b6ce6dab6
+3 -3
View File
@@ -2234,9 +2234,9 @@ Terminal.prototype.handler = function(data) {
return;
}
// Clear the selection
if (this.hasSelection()) {
this.clearSelection();
// Clear the selection if the selection manager is available and has an active selection
if (this.selectionManager && this.selectionManager.hasSelection) {
this.selectionManager.clearSelection();
}
// Input is being sent to the terminal, the terminal should focus the prompt.