fix(patch): cherry-pick 8cae90f to release/v0.27.0-preview.7-pr-18108 [CONFLICTS] (#18230)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
gemini-cli-robot
2026-02-03 13:41:47 -08:00
committed by GitHub
parent 93c2f0cabb
commit 57c7f6faeb
2 changed files with 55 additions and 2 deletions

View File

@@ -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;
}
@@ -2974,6 +2974,8 @@ export function useTextBuffer({
cursorCol,
lines,
singleLine,
visualCursor,
visualLines,
],
);