From c961408bf7ef733afff29c8de87d48bc72f31a64 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 20:31:29 -0700 Subject: [PATCH] fix(browser): use startY in horizontalDirection row helper call horizontalDirection called moveToRequestedRow with targetX as the first argument, but that parameter is the starting row (startY). resetStartingRow and moveToRequestedCol already pass startY correctly; only this copy-paste mistake passed a column index where a row was expected. That could miscompute wrapped-row offsets and emit the wrong horizontal arrow key sequence when building selection/cursor movement strings. Co-authored-by: Cursor --- src/browser/input/MoveToCell.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/input/MoveToCell.ts b/src/browser/input/MoveToCell.ts index b5ddc7ca2..9cc27088d 100644 --- a/src/browser/input/MoveToCell.ts +++ b/src/browser/input/MoveToCell.ts @@ -156,7 +156,7 @@ function wrappedRowsForRow(currentRow: number, bufferService: IBufferService): n */ function horizontalDirection(startX: number, startY: number, targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): Direction { let startRow; - if (moveToRequestedRow(targetX, targetY, bufferService, applicationCursor).length > 0) { + if (moveToRequestedRow(startY, targetY, bufferService, applicationCursor).length > 0) { startRow = targetY - wrappedRowsForRow(targetY, bufferService); } else { startRow = startY;