Inline code color bleeds into adjacent Cyrillic characters
Description
When using inline code (backtick formatting) in responses containing Cyrillic text, the blue color applied to inline code "bleeds" into adjacent characters. Individual letters within surrounding Cyrillic words get incorrectly colored blue.
Steps to Reproduce
- In Claude Code terminal, trigger a response that contains inline code mixed with Cyrillic text
- For example, a response containing: `
жирный— отображается ярко-белым`
Expected Behavior
Only the text inside backticks should be colored (blue). Surrounding Cyrillic text should retain default coloring.
Actual Behavior
Random individual Cyrillic characters in words adjacent to (or near) inline code spans are rendered in blue. The color boundary is misaligned — it appears shifted by a few characters, likely due to multibyte character width miscalculation.
Screenshots
Inline code with Cyrillic — blue color bleeds into nearby words:
!Screenshot showing blue color bleed on Cyrillic text near inline code
(Two screenshots were observed but cannot be attached programmatically. The issue is easily reproducible.)
Environment
- OS: Windows 11 Pro 10.0.26100
- Shell: Git Bash (bash)
- Terminal: Windows Terminal
- Claude Code model: claude-opus-4-6
Analysis
This is likely caused by the terminal renderer calculating string width using byte length rather than character/grapheme width for multibyte (UTF-8) Cyrillic characters. When applying ANSI color codes for inline code spans, the start/end positions are offset, causing color to spill into adjacent text.
🤖 Generated with Claude Code
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗