]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/xterm.js
Merge branch 'master' into guard_selection_api
[mirror_xterm.js.git] / src / xterm.js
index f82d46b5eddae3070775aea6c134b701e2bfa524..a97070961df2e722c77a229a5ce5e20fb5d3a6e8 100644 (file)
@@ -2238,6 +2238,11 @@ Terminal.prototype.handler = function(data) {
     return;
   }
 
+  // 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.
   if (this.ybase !== this.ydisp) {
     this.scrollToBottom();