Skip to content

Commit

Permalink
Make sure selection manager is available (only after open() was called)
Browse files Browse the repository at this point in the history
  • Loading branch information
mofux authored and parisk committed Jul 14, 2017
1 parent 1cc0d43 commit 1b6ce6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1b6ce6d

Please sign in to comment.