Merge pull request #1091 from Tyriar/1090_force_selection

Don't send mouse events when selection is forced
This commit is contained in:
Daniel Imms
2017-11-01 08:46:38 -07:00
committed by GitHub
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);