Merge pull request #1078 from Tyriar/vsc36328

Add null check in MouseZoneManager._findZoneEventAt
This commit is contained in:
Daniel Imms
2017-10-24 10:19:55 -07:00
committed by GitHub
+3
View File
@@ -170,6 +170,9 @@ export class MouseZoneManager implements IMouseZoneManager {
private _findZoneEventAt(e: MouseEvent): IMouseZone {
const coords = this._terminal.mouseHelper.getCoords(e, this._terminal.element, this._terminal.charMeasure, this._terminal.options.lineHeight, this._terminal.cols, this._terminal.rows);
if (!coords) {
return null;
}
for (let i = 0; i < this._zones.length; i++) {
const zone = this._zones[i];
if (zone.y === coords[1] && zone.x1 <= coords[0] && zone.x2 > coords[0]) {