[BUG] Devanagari (Hindi) text corrupts the whole TUI on Linux: stale frames not cleared, lines overlap (v2.1.295)
Description
When a session contains Hindi (Devanagari) text, the TUI on Linux corrupts the whole screen. Earlier frames are not cleared. New output, spinner lines and status lines are drawn on top of old content. Latin text from different messages ends up interleaved character by character in the same rows, so the conversation becomes unreadable.
This looks like the same defect class as #53968 (Devanagari, macOS, closed and locked), #82338 (Tamil) and #85441 (Bangla): the renderer counts display width per code point, but Devanagari has many zero-width combining marks (matras, virama, nukta) and conjuncts. The renderer's column count then disagrees with the terminal's, the cursor position drifts, and the differential redraw writes at the wrong positions and never erases the stale cells.
#53968 is locked, so I am filing this as a fresh report for Linux on a current version.
Environment
- CLI version 2.1.295
- Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic
- GNOME Terminal (VTE 0.84,
VTE_VERSION=8400),TERM=xterm-256color,COLORTERM=truecolor
Steps to reproduce
- Start the CLI in any project.
- Get a long block of Hindi text into the conversation. In my case it was a multi-paragraph Hindi audio transcript returned by a tool call. Pasting a few paragraphs of Hindi into the prompt, or asking the model to reply in Hindi, should also work.
- Keep working in the session so that more output, spinners ("Computing…", "Churned for 42s") and shell-command status lines get rendered after the Hindi block.
Observed
- Hindi paragraphs render with characters scattered across columns and wrapping at the wrong positions.
- Later frames are drawn over earlier ones instead of replacing them. Status lines such as
Ran 1 shell command,Churned for 42s · done 9:04 pm · 2 shells still runningandRunning 2 shell commands…appear in the middle of leftover text from older messages. - English text from two different messages is merged on the same row (for example, a sentence from the assistant reply overlaid character by character on a sentence from the tool output).
- A
(0 lines hidden)marker appears in the middle of the corrupted area. - The corruption persists while the session continues; it is not limited to the rows that contain Devanagari.
I have a screenshot of the corrupted screen and can attach it in a comment.
Expected
Devanagari text renders with correct column accounting (grapheme-cluster width that matches the terminal), and the rest of the UI stays aligned and is redrawn cleanly.
Related
- #53968 Hindi/Devanagari text renders broken in terminal TUI (macOS, closed, locked)
- #82338 Tamil script output collapses TUI rendering (combining-mark width bug)
- #85441 Terminal rendering broken with Bangla language input
- #60701 Arabic with diacritics:
Bun.stringWidthtreats combining marks as width 1