]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/SelectionManager.ts
Merge branch 'master' into 724_fix_hasSelection
[mirror_xterm.js.git] / src / SelectionManager.ts
index 3138048af6362923183fd7c4f734abd3c504bd47..b3316ae6cdad574ac79e867f3f64c491cf44de6a 100644 (file)
@@ -184,7 +184,12 @@ export class SelectionManager extends EventEmitter {
    * Gets whether there is an active text selection.
    */
   public get hasSelection(): boolean {
-    return !!this._model.finalSelectionStart && !!this._model.finalSelectionEnd;
+    const start = this._model.finalSelectionStart;
+    const end = this._model.finalSelectionEnd;
+    if (!start || !end) {
+      return false;
+    }
+    return start[0] !== end[0] || start[1] !== end[1];
   }
 
   /**