CJK full-width characters clipped at right terminal edge during text wrapping

Resolved 💬 4 comments Opened Feb 6, 2026 by hiroka Closed Feb 6, 2026

!Image
!Image

Bug Description

When Claude Code renders Japanese (CJK) text, full-width characters at the right edge of the terminal get clipped/cut off. Resizing the window slightly wider fixes the display, confirming this is a column-width calculation issue during text wrapping.

Steps to Reproduce

  1. Set terminal to a typical width (e.g., 80-120 columns)
  2. Ask Claude Code a question that produces Japanese output
  3. Observe the right edge of wrapped lines containing CJK characters

Expected Behavior

Full-width (2-column) CJK characters should wrap to the next line when there is only 1 column remaining at the right edge, rather than being partially rendered/clipped.

Actual Behavior

When a full-width character (2 columns wide) lands at a position where only 1 column remains on the line, the character is clipped — only half of it is rendered, or it disappears entirely.

Screenshots

Before (clipped): The character 「を」 at the end of line 3 is cut off.

After (window resized wider): The same text renders correctly with proper wrapping.

(Screenshots available but cannot be attached via CLI — the text shown is: 「悲しい」と出力することと、悲しみを — where 「を」 gets clipped)

Environment

  • Claude Code v2.1.32
  • macOS Darwin 24.6.0
  • Terminal: tmux in iTerm2 / Terminal.app
  • Language setting: Japanese

Notes

This is a common CJK rendering issue. The text wrapping logic likely needs to check wcwidth() or equivalent to determine that CJK characters occupy 2 columns, and wrap early when only 1 column remains at the line edge.

View original on GitHub ↗

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