[DOCS] [Interactive mode] Up/Down arrow behavior on wrapped rows of a long input line is undocumented

Open 💬 1 comment Opened Jun 9, 2026 by coygeek

Documentation Type

Unclear/confusing documentation

Documentation Location

https://code.claude.com/docs/en/interactive-mode

Section/Topic

The Up/Down arrows or Ctrl+P/Ctrl+N row of the Keyboard shortcuts table (in the "Chat and input" section) and the related "Command history" section. The same shortcut is also listed in https://code.claude.com/docs/en/keybindings under the History actions table (the history:previous and history:next actions, bound to Up and Down).

Current Documentation

The keyboard-shortcuts table in interactive-mode.md currently says:

| Up/Down arrows or Ctrl+P/Ctrl+N | Move cursor or navigate command history | In multiline input, first moves the cursor within the prompt. Once the cursor is already on the top or bottom edge, pressing again navigates command history |

The "Command history" section in the same page (line 219) says:

* Use Up/Down arrows to navigate (see keyboard shortcuts above)

And the keybindings.md History actions table lists:

| history:previous | Up | Previous history item | | history:next | Down | Next history item |

None of these descriptions distinguish between the logical line (the prompt's internal line breaks) and the visual row (a wrapped segment of a long line that spans multiple terminal rows). They also don't describe where history recall starts when the cursor is somewhere in the middle of a wrapped, multi-row line.

What's Wrong or Missing?

v2.1.169 changed how the Up and Down arrow keys behave on a long input line that wraps across multiple terminal rows. The changelog entry reads:

* Fixed Up/Down arrows jumping to command history past the wrapped rows of a long input line — they now move through each visual row first, and history recall enters at the near edge

The current docs only describe cursor-vs-history navigation in terms of the top or bottom edge of the prompt, which is ambiguous when a single logical line is wrapped across many visual rows. A user reading the docs sees:

  • "Move cursor within the prompt" — this gives the impression of logical-line cursor movement.
  • "Once the cursor is already on the top or bottom edge, pressing again navigates command history" — this gives the impression that there is a single edge to reach before history navigation kicks in.

The actual v2.1.169 behavior is more specific:

A. Per-visual-row traversal

On a long input that wraps across multiple terminal rows, Up/Down now moves the cursor through each visual row of the wrap before any history navigation happens. The old wording ("within the prompt" / "top or bottom edge") does not communicate that a single logical line can occupy several visual rows, and that each visual row edge is a separate stepping point.

B. Near-edge history recall

When the cursor finally reaches a wrap edge and the user presses the arrow again, history recall now enters at the near edge (the edge of the current visual row), not at a position past the user's last edit. The previous "top or bottom edge" wording doesn't capture this "near edge" semantics — users currently can't tell from the docs which row history recall will appear at on a wrapped line.

C. No mention in the keybindings reference

The history:previous / history:next entries in keybindings.md (lines 95–96) describe the actions as "Previous history item" and "Next history item" with no mention of the visual-row cursor traversal that runs before the history call. Users customizing these bindings (e.g., rebinding to a different key) won't know the new behavior is gated on visual-row movement.

Suggested Improvement

Update the Up/Down arrows or Ctrl+P/Ctrl+N row of the keyboard-shortcuts table in interactive-mode.md so the "Context" column matches the v2.1.169 behavior, for example:

Before:

In multiline input, first moves the cursor within the prompt. Once the cursor is already on the top or bottom edge, pressing again navigates command history

After:

On a long input that wraps across multiple terminal rows, moves the cursor through each visual row first. Once the cursor is at the top or bottom edge of the input, the next press navigates command history, entering at the near edge of the current line.

Also extend the "Command history" section's bullet:

Before:

* Use Up/Down arrows to navigate (see keyboard shortcuts above)

After:

* Use Up/Down arrows to navigate. On a long, wrapped input line the arrows first move the cursor through each visual row; history recall starts at the near edge once the cursor is already on the top or bottom edge of the input.

And in keybindings.md, expand the History actions descriptions to acknowledge the visual-row traversal, e.g.:

Before:

| history:previous | Up | Previous history item | | history:next | Down | Next history item |

After:

| history:previous | Up | Previous history item. On a wrapped input line, the arrow first moves the cursor up through each visual row; history recall then enters at the near edge | | history:next | Down | Next history item. On a wrapped input line, the arrow first moves the cursor down through each visual row; history recall then enters at the near edge |

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/interactive-mode | 38 | Up/Down arrows or Ctrl+P/Ctrl+N row in the Keyboard shortcuts table |
| https://code.claude.com/docs/en/interactive-mode | 219 | "Command history" bullet pointing back to the shortcuts table |
| https://code.claude.com/docs/en/keybindings | 95–96 | history:previous and history:next action descriptions |

Total scope: 3 references across 2 pages

Version: v2.1.169

Related changelog entry (v2.1.169):

Fixed Up/Down arrows jumping to command history past the wrapped rows of a long input line — they now move through each visual row first, and history recall enters at the near edge

Notes for the docs team: The "Multiline input" wording in the current docs was a reasonable description for logical-line navigation but stopped being complete once cursor movement also stepped through wrapped visual rows of a single logical line. The keybindings reference is the second-best fix point because the actions are independently rebindable, and anyone who moves history:previous to another key should still understand the visual-row cursor traversal that precedes the history call.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗