[Bug] CJK text selection highlight misaligned/ghosted in JetBrains JediTerm fullscreen TUI

Open 💬 0 comments Opened Jul 14, 2026 by licovery

Bug Description
Fullscreen TUI: CJK (Chinese) selection highlight misaligned/ghosted in JetBrains GoLand terminal (JediTerm) — experiment matrix included

Environment:

  • Claude Code v2.1.209, /tui fullscreen, macOS (Darwin 25.4.0)
  • GoLand 2026.1.4 integrated terminal (JediTerm), TERMINAL_EMULATOR=JetBrains-JediTerm
  • Only reproduces in the JetBrains terminal; same session in other terminals is fine

Symptom:
Click-drag selecting Chinese (double-width) text draws the in-app selection
highlight misaligned, and stale highlight fragments from earlier drag
positions remain on screen (two disjoint colored blocks). Selecting
ASCII-only text works correctly.

Experiment matrix (each cell = does the bug reproduce):

| JediTerm engine | incremental rendering | CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1 |
|----------------------------|-----------------------|----------------------------------------|
| reworked2025 | broken | broken |
| classic | broken | FIXED |

Neither variable alone fixes it; only the combination (full repaint + the
other engine) renders correctly.

Analysis:
Since one terminal configuration renders the emitted frames correctly, the
frames Claude Code sends are likely correct, and each JediTerm engine has a
distinct wide-char defect: one engine mishandles wide-char background cells
even under full repaint; the other mishandles incremental positioned writes
that cross double-width characters. Possibly related to #56622
(wcwidth-unaware overlay clipping).

Workarounds found:

  • CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1 + switching the JetBrains terminal

engine (combination required)

Environment Info

  • Platform: darwin
  • Terminal: goland
  • Version: 2.1.209
  • Feedback ID: 7e2d0fe2-523c-41c5-8083-d4c4c7da771e

Errors

[]

View original on GitHub ↗