claude-code - 💡(How to fix) Fix Up/Down arrows jump to history instead of moving cursor through wrapped multi-line prompt input (macOS + Linux/WSL native build; Windows unaffected)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Workarounds

RAW_BUFFERClick to expand / collapse

What happened

In the prompt input, when a message is long enough to soft-wrap across multiple visual rows, pressing Up/Down navigates command history instead of moving the cursor between the wrapped rows. You can only reach the start of the text by holding Left, or by clicking with the mouse.

On the Windows build (same version), Up/Down correctly walk the wrapped rows and only fall through to history at the top/bottom edge. On macOS and Linux/WSL native builds, they jump straight to history.

Steps to reproduce

  1. On a macOS or Linux/WSL build, type a prompt long enough to wrap to 2+ visual rows (no manual newlines).
  2. Put the cursor on the last row, press Up.
  3. Expected: cursor moves up one visual row. Actual: the input is replaced with the previous history entry.

Key findings

  • Platform-split: reproduces on macOS and Linux/WSL2. Not reproducible on the Windows build at the same version.
  • Renderer-independent: happens in both "tui": "default" (classic main-screen) and "tui": "fullscreen" / CLAUDE_CODE_NO_FLICKER=1 (flicker-free alt-screen) renderers. Confirmed by editing settings.json and restarting in each mode.
  • Keys arrive fine: Left/Right move the cursor by character normally, so the arrow key events are reaching the input - it's the Up/Down cursor-vs-history routing that's wrong, not key delivery.
  • Regression: per #20328, the last known-good version was 2.1.14; the behavior broke around 2.1.15. Still present in 2.1.156.

Environment

  • Version: 2.1.156 (native installer)
  • Reproduced on: macOS and WSL2 (Ubuntu 25.10), both native builds
  • Windows build of the same version is unaffected
  • Terminals: WezTerm (and per #20328, also iTerm2 and gnome-terminal), so this appears terminal-independent

Related

  • #20328 - same bug, auto-closed as stale (never fixed)
  • #6275 - related, still open

Workarounds

Ctrl+A / Ctrl+E / Home / End to jump within the line; mouse-click to position the cursor; PageUp/PageDown for scrolling in fullscreen mode.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Up/Down arrows jump to history instead of moving cursor through wrapped multi-line prompt input (macOS + Linux/WSL native build; Windows unaffected)