Regression: Chinese characters cause incorrect line wrapping in diff view (2.0.74)
Bug Description
In the diff view, Chinese (CJK) characters cause incorrect line wrapping, resulting in extra blank lines and truncated comments.
Version Information
- Affected version: 2.0.74
- Working version: 2.0.72
- This is a regression introduced in 2.0.73 or 2.0.74
Steps to Reproduce
- Edit a file with Chinese comments
- View the diff in Claude Code terminal
- Observe incorrect line wrapping for CJK characters
Expected Behavior
Chinese comments should render on the same line (as in 2.0.72)
Actual Behavior
Chinese comments are incorrectly truncated and wrapped to the next line, causing:
- Extra blank lines in diff view
- Comments split across multiple lines
- Misaligned diff display
Root Cause (Suspected)
CJK characters are full-width (2 character widths) but the terminal renderer may be calculating them as 1 character width, causing incorrect line width calculation and forced wrapping.
Screenshots
2.0.74
2.0.72
I'm experiencing the same issue on Windows with Japanese text.
Environment:
- Claude Code: v2.0.74
- OS: Windows 11
- Terminal: Windows Terminal (cmd)
Reproduction: When editing files containing Japanese comments, the diff view displays extra blank lines between each line. The issue occurs regardless of content - even simple one-line changes show incorrect spacing.
Screenshot:
Update: Tested on v2.0.75, the issue is NOT fully fixed.
Improvements in v2.0.75:
- Line numbers are now aligned correctly
Still broken:
- Extra blank lines between diff hunks
- Empty lines with just
+marker appearing (e.g., lines 13, 15) - Unnecessary spacing between deleted and added lines
Screenshot from v2.0.75: The diff view still shows excessive blank lines when displaying CJK characters.
Please continue investigating this regression.
2.0.75
2.0.72
This issue still exists in version 2.0.76.