[BUG] Ctrl+E does not move cursor to end of line with Japanese/fullwidth characters
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [x] Google Vertex AI
- [ ] Other:
- 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
- Start Claude Code in interactive mode
- Type a line containing Japanese text, for example:
たとえば、日本語のような全角文字では ctrl+e を押してもカーソルが文末まで移動しない。 - Press Ctrl+E to move to end of line
- 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
Hi @masakiaota! Can you please try updating to v1.0.38 and see if that fixes the issue? Thanks.
Wow working perfectly, I love this. I really appreciated it. @chrislloyd
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.