Fix up/down arrow regression and add test. (#18108)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Jacob Richman
2026-02-02 13:55:45 -08:00
committed by GitHub
parent c5d0fc2c3e
commit 8cae90f404
2 changed files with 59 additions and 2 deletions
@@ -2905,12 +2905,12 @@ export function useTextBuffer({
return true;
}
if (keyMatchers[Command.MOVE_UP](key)) {
if (cursorRow === 0) return false;
if (visualCursor[0] === 0) return false;
move('up');
return true;
}
if (keyMatchers[Command.MOVE_DOWN](key)) {
if (cursorRow === lines.length - 1) return false;
if (visualCursor[0] === visualLines.length - 1) return false;
move('down');
return true;
}
@@ -2990,6 +2990,8 @@ export function useTextBuffer({
singleLine,
setText,
text,
visualCursor,
visualLines,
],
);