claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Arrow Key Navigation Broken When Using Multiple Pasted Text Blocks

Open herculesggimenes opened this issue 7 months ago • 3 comments

Environment

  • Platform (select one):
    • [ ] Anthropic API
    • [X] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: 1.0.22 (Claude Code)<!-- output of claude --version -->
  • Operating System: MacOS 15.5 (24F74)
  • Terminal: Iterm2

Bug Description

When entering a multiline message with pasted text blocks, the up arrow key navigation doesn't work properly. Instead of navigating to previous lines within the current message, pressing the up arrow jumps to the previous chat message.

Steps to Reproduce

  1. Open a Claude session with existing chat history
  2. Paste a text block
  3. Press Enter to create a new line
  4. Paste another text block
  5. Press Enter again to create an empty line
  6. Add some text on the new line
  7. Press the up arrow key

Expected Behavior

When pressing the up arrow key, it should navigate to the previous line within the current message (empty line → second pasted block → first pasted block), allowing in-message navigation.

Actual Behavior

When pressing the up arrow key, instead of navigating to the previous lines within the current message, it jumps to the previous chat message entirely, skipping over the pasted text blocks as if they were not navigable content.

Additional Context

https://github.com/user-attachments/assets/ffb51318-353c-4b2d-8b01-085f6b73df8d

herculesggimenes avatar Jun 13 '25 16:06 herculesggimenes

  • Confirmed that this is happening on another environment.
  • Only on multi-line pastes where command line shows [Pasted text #1 +X lines] (boundary seems to be 6 or 7 lines)
  • Single lines work properly for me

Environment

  • Connection: Claude Code Max
  • Claude Version: 1.0.24 (Claude Code)
  • Terminal: Windows Terminal
  • OS: Ubuntu 24.04.2 LTS

adamkwhite avatar Jun 16 '25 22:06 adamkwhite

The up arrow also no longer works when it hits a /clear history entry - it just cycles between /clear and /compact.

Edit: made a separate issue for this: https://github.com/anthropics/claude-code/issues/2244

ajwrigley avatar Jun 17 '25 03:06 ajwrigley

This is very annoying. One workaround I found is to move the caret left and right which can move through multiple line but that's very slow. Workaround for the workaround is to use ctrl+left and ctrl+right which is much faster to move through multiple lines.

accordaccount avatar Jun 17 '25 20:06 accordaccount

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]