claude-code - 💡(How to fix) Fix Backspace in prompt input deletes entire Thai grapheme cluster instead of one code point [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60462Fetched 2026-05-20 03:57:57
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

When typing Thai (and likely other scripts that use combining characters — Arabic, Devanagari, Hebrew, etc.) into the interactive prompt input, pressing Backspace once deletes the entire grapheme cluster (the whole visible syllable) instead of removing only the last code point. This makes it very hard to correct typing mistakes on a single tone mark or vowel sign.

Root Cause

Thai writers routinely need to fix a single misplaced vowel or tone mark mid-word. Today the only way to do that is to retype the entire syllable, which is a significant friction for any non-trivial Thai prompt. The same issue likely affects Arabic harakat, Devanagari matras, Hebrew niqqud, and other combining-mark scripts.

Fix Action

Fix / Workaround

Workarounds users currently rely on

RAW_BUFFERClick to expand / collapse

Summary

When typing Thai (and likely other scripts that use combining characters — Arabic, Devanagari, Hebrew, etc.) into the interactive prompt input, pressing Backspace once deletes the entire grapheme cluster (the whole visible syllable) instead of removing only the last code point. This makes it very hard to correct typing mistakes on a single tone mark or vowel sign.

Reproduction

  1. Start an interactive session: claude
  2. In the prompt input box, type the Thai word ทำ (which is U+0E17 + U+0E33 — 2 code points, 1 grapheme cluster)
  3. Press Backspace once

Expected: only (U+0E33) is removed; remains in the input.

Actual: both code points are removed at once — the entire word disappears.

Same behavior with นี่ ( U+0E19 + U+0E35 + U+0E48): one Backspace removes all three code points instead of just the tone mark .

Why this matters

Thai writers routinely need to fix a single misplaced vowel or tone mark mid-word. Today the only way to do that is to retype the entire syllable, which is a significant friction for any non-trivial Thai prompt. The same issue likely affects Arabic harakat, Devanagari matras, Hebrew niqqud, and other combining-mark scripts.

Environment

  • Claude Code: 2.1.144
  • macOS: 15.5 (arm64)
  • Terminal: Ghostty (also reproducible regardless of terminal, since the behavior is in CC's input layer, not the terminal)
  • TERM=xterm-256color, LANG=en_US.UTF-8

Notes

  • The bug is in Claude Code's prompt input implementation (Ink-based), not in the terminal — Ghostty handles grapheme clusters correctly elsewhere, and this reproduces in iTerm2 / Terminal.app as well.
  • I checked claude --help thoroughly and found no flag/env var to switch the deletion granularity (code point vs grapheme cluster).
  • Suggested fix: on Backspace, remove only the last Unicode code point (or, even better, the last extended-grapheme-cluster component) rather than the whole grapheme cluster. Standard readline/most native text inputs delete one code point at a time, which is the muscle-memory expectation.

Workarounds users currently rely on

  • Use an external editor ($EDITOR) for any non-trivial Thai input — but this defeats the inline-chat UX.
  • Compose text in another app and paste it in.

Neither is acceptable for everyday typing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Backspace in prompt input deletes entire Thai grapheme cluster instead of one code point [1 comments, 2 participants]