[BUG] Ctrl+E does not move cursor to end of line with Japanese/fullwidth characters

Resolved 💬 3 comments Opened Jun 25, 2025 by masakiaota Closed Jul 1, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [x] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.34 (Claude Code)
  • Operating System: macOS 15.5, Ubuntu 24.04 LTS
  • Terminal: iTerm

Bug Description

When using Ctrl+E (move to end of line) on lines containing Japanese or other fullwidth characters, the cursor does not move to the actual end of the line. It stops in the middle of the line, making text editing difficult for users working with Japanese text.

Steps to Reproduce

  1. Start Claude Code in interactive mode
  2. Type a line containing Japanese text, for example: たとえば、日本語のような全角文字では ctrl+e を押してもカーソルが文末まで移動しない。
  3. Press Ctrl+E to move to end of line
  4. Observe that cursor stops in the middle of the line instead of at the end

Expected Behavior

Cursor should move to the very end of the line, after the final character (。in this example).

Actual Behavior

Cursor stops partway through the line. In the example text, the cursor stops after character, leaving してもカーソルが文末まで移動しない。 unreachable via Ctrl+E.

Additional Context

  • This issue occurs consistently on both macOS 15.5 and Ubuntu 24.04 LTS
  • The issue is reproducible with any Japanese text containing hiragana, katakana, or kanji
  • English-only lines work correctly with Ctrl+E
  • This appears to be related to incorrect calculation of character widths for fullwidth (East Asian) characters
  • Screenshot attached showing the cursor position after pressing Ctrl+E

!Image

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗