From 76d4de225a541d19be340e2d0bba7e423211f300 Mon Sep 17 00:00:00 2001 From: kumaran-14 Date: Fri, 10 Jan 2020 00:40:49 +0530 Subject: [PATCH] Run eslint and fix errors --- src/browser/input/MoveToCell.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/browser/input/MoveToCell.ts b/src/browser/input/MoveToCell.ts index 72a24280..9b493288 100644 --- a/src/browser/input/MoveToCell.ts +++ b/src/browser/input/MoveToCell.ts @@ -31,15 +31,14 @@ export function moveToCellSequence(targetX: number, targetY: number, bufferServi // Only move horizontally for the normal buffer let direction; - if(startY == targetY) { + if (startY === targetY) { direction = startX > targetX ? Direction.LEFT : Direction.RIGHT; return repeat(Math.abs(startX - targetX), sequence(direction, applicationCursor)); - } else { + } direction = startY > targetY ? Direction.LEFT : Direction.RIGHT; return repeat(colsFromRowEnd(startY > targetY ? targetX : startX, bufferService), sequence(direction, applicationCursor)) - + repeat((Math.abs(wrappedRowsForRow(bufferService, startY) - wrappedRowsForRow(bufferService, targetY))-1)*bufferService.cols, sequence(direction, applicationCursor)) + + repeat((Math.abs(wrappedRowsForRow(bufferService, startY) - wrappedRowsForRow(bufferService, targetY)) - 1 ) * bufferService.cols, sequence(direction, applicationCursor)) + repeat(colsFromRowBeginning(startY > targetY ? startX : targetX, bufferService), sequence(direction, applicationCursor)); - } } /**