diff --git a/src/browser/input/Mouse.ts b/src/browser/input/Mouse.ts index 5f73743fb..9ea1d6019 100644 --- a/src/browser/input/Mouse.ts +++ b/src/browser/input/Mouse.ts @@ -31,7 +31,7 @@ export function getCoordsRelativeToElement(window: Pick, event: Pick, element: HTMLElement, colCount: number, rowCount: number, hasValidCharSize: boolean, cssCellWidth: number, cssCellHeight: number, isSelection?: boolean): [number, number] | undefined { - // Coordinates cannot be measured if there are no valid + // Coordinates cannot be measured if there is no valid character size. if (!hasValidCharSize) { return undefined; } @@ -45,7 +45,7 @@ export function getCoords(window: Pick, event: Pick< coords[1] = Math.ceil(coords[1] / cssCellHeight); // Ensure coordinates are within the terminal viewport. Note that selections - // need an addition point of precision to cover the end point (as characters + // need an additional point of precision to cover the end point (as characters // cover half of one char and half of the next). coords[0] = Math.min(Math.max(coords[0], 1), colCount + (isSelection ? 1 : 0)); coords[1] = Math.min(Math.max(coords[1], 1), rowCount);