Run eslint and fix errors

This commit is contained in:
kumaran-14
2020-01-10 00:40:49 +05:30
parent f5c3b00c42
commit 76d4de225a
+3 -4
View File
@@ -31,15 +31,14 @@ export function moveToCellSequence(targetX: number, targetY: number, bufferServi
// Only move horizontally for the normal buffer // Only move horizontally for the normal buffer
let direction; let direction;
if(startY == targetY) { if (startY === targetY) {
direction = startX > targetX ? Direction.LEFT : Direction.RIGHT; direction = startX > targetX ? Direction.LEFT : Direction.RIGHT;
return repeat(Math.abs(startX - targetX), sequence(direction, applicationCursor)); return repeat(Math.abs(startX - targetX), sequence(direction, applicationCursor));
} else { }
direction = startY > targetY ? Direction.LEFT : Direction.RIGHT; direction = startY > targetY ? Direction.LEFT : Direction.RIGHT;
return repeat(colsFromRowEnd(startY > targetY ? targetX : startX, bufferService), sequence(direction, applicationCursor)) 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)); + repeat(colsFromRowBeginning(startY > targetY ? startX : targetX, bufferService), sequence(direction, applicationCursor));
}
} }
/** /**