[BUG] Thai combining-mark cursor bug has regressed (previously fixed in #22390) — v2.1.220

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Description

Typing Thai text in the interactive prompt causes vowel/tone marks (combining
characters) to be dropped or misplaced, and the cursor lands in the wrong
position. This matches the symptoms previously fixed in #22390 (Feb 2026) and
later reported again in #51444 (Apr 2026, closed as duplicate). It is still
present in the current release.

Environment

  • Claude Code: 2.1.220
  • OS (server side, where claude-code runs): Ubuntu, Linux 6.8.0-124-generic (x86_64)
  • Client: Termius (Android app), connecting via SSH
  • TERM: xterm-256color
  • LANG: en_US.UTF-8 (confirmed not a locale issue)
  • Note: same symptom previously confirmed on desktop terminals (iTerm2,

Ghostty, Terminal.app on macOS) per #21711 / #51444 — reproduces across
completely different terminal engines and platforms (desktop macOS +
mobile Android/Termius), which points away from any specific
terminal-emulator implementation and toward claude-code's own input
component.

Related issues

  • #22390 — same symptom, fixed 2026-02-06 (SARA AA was misclassified as

zero-width; corrected to spacing-vowel width). Fix does not appear to hold.

  • #51444 — reopened with identical symptoms 2026-04-21, closed as duplicate

without a clear linked fix.

  • #21711, #20932, #19237 — earlier reports of the same underlying issue.

What Should Happen?

Cursor position should track the visually-rendered grapheme position, not
raw code-point count, for scripts using combining marks (Thai, Vietnamese,
Devanagari, Arabic, Hebrew, etc.).

Error Messages/Logs

Steps to Reproduce

  1. Run claude interactively.
  2. Type Thai text containing combining vowels/tone marks, e.g.:

การอัปเดตนี้ยังไม่เสร็จ

  1. Observe the input line while typing: vowel marks (สระ, e.g. ั ี ึ ่ ้ ์)

render incorrectly or disappear, and the cursor is no longer under the
character you just typed.

  1. Copy the same string from an external editor and paste it into the prompt

instead of typing it.

  • The pasted text displays correctly (all combining marks visible).
  • But the cursor position after the paste is still wrong — it does not

land at the true end of the (visually rendered) string.

This isolates the bug to cursor/index handling specifically: the input
component appears to track cursor position by code-point count rather than
by grapheme cluster, so any text containing zero-width/combining Unicode
(Thai vowel and tone marks, U+0E30–U+0E3A, U+0E47–U+0E4E) desyncs the
cursor's logical index from its visual position. Static stdout output (e.g.
Claude's own responses) is unaffected, since it isn't subject to per-keystroke
re-render/cursor math.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.220

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗