Don't send mouse events when selection is forced

Fixes #1090
This commit is contained in:
Daniel Imms
2017-10-27 16:48:00 -07:00
parent 8ece306dbe
commit d81df46453
2 changed files with 16 additions and 4 deletions
+6 -1
View File
@@ -943,7 +943,12 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
ev.preventDefault();
this.focus();
if (!this.mouseEvents) return;
// Don't send the mouse button to the pty if mouse events are disabled or
// if the selection manager is having selection forced (ie. a modifier is
// held).
if (!this.mouseEvents || this.selectionManager.shouldForceSelection(ev)) {
return;
}
// send the button
sendButton(ev);