[GH-ISSUE #479] [BUG] Thai text corruption/garbling when scrolling #891

Open
opened 2026-03-14 08:57:17 +03:00 by kerem · 7 comments
Owner

Originally created by @veerapan-boo on GitHub (Jan 6, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/479

There is a visual corruption issue when scrolling content that contains Thai text or other complex scripts with combining marks. The characters become garbled and "shuffled" specifically during scroll operations (scrolling up or down).
Interestingly, the static rendering of the same text (when not scrolling) appears perfectly fine. The issue seems to be triggered only when the content position changes within a scrollable view.

Environment:

  • OpenCode Version: 1.1.3
  • OpenTUI Version: 0.1.69
  • Platform: macOS (arm64) / Linux
  • Renderer: @opentui/core

Prompt for test:
"ภาษาไทย คืออะไร อธิบายมาอย่างละเอียด ?"

Image
Originally created by @veerapan-boo on GitHub (Jan 6, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/479 There is a visual corruption issue when scrolling content that contains Thai text or other complex scripts with combining marks. The characters become garbled and "shuffled" specifically during scroll operations (scrolling up or down). Interestingly, the static rendering of the same text (when not scrolling) appears perfectly fine. The issue seems to be triggered only when the content position changes within a scrollable view. Environment: - OpenCode Version: 1.1.3 - OpenTUI Version: 0.1.69 - Platform: macOS (arm64) / Linux - Renderer: @opentui/core Prompt for test: "ภาษาไทย คืออะไร อธิบายมาอย่างละเอียด ?" <img width="1861" height="765" alt="Image" src="https://github.com/user-attachments/assets/189d33cb-67e7-43eb-a126-040aa4bede6f" />
Author
Owner

@remorses commented on GitHub (Jan 6, 2026):

Does this only happen with latest version of opencode?

<!-- gh-comment-id:3714139021 --> @remorses commented on GitHub (Jan 6, 2026): Does this only happen with latest version of opencode?
Author
Owner

@veerapan-boo commented on GitHub (Jan 6, 2026):

@remorses It's been an issue since I started using OpenCode back in version 1.0.x. I think it’s been around for a long time.

<!-- gh-comment-id:3714248199 --> @veerapan-boo commented on GitHub (Jan 6, 2026): @remorses It's been an issue since I started using OpenCode back in version 1.0.x. I think it’s been around for a long time.
Author
Owner

@kommander commented on GitHub (Jan 6, 2026):

That is a grapheme width calculation issue, it's not getting the correct width for combining characters. Needs to be addressed.

<!-- gh-comment-id:3714455256 --> @kommander commented on GitHub (Jan 6, 2026): That is a grapheme width calculation issue, it's not getting the correct width for combining characters. Needs to be addressed.
Author
Owner

@veerapan-boo commented on GitHub (Jan 6, 2026):

Thank you. I'll be waiting for when it’s ready to use.

<!-- gh-comment-id:3714736482 --> @veerapan-boo commented on GitHub (Jan 6, 2026): Thank you. I'll be waiting for when it’s ready to use.
Author
Owner

@kommander commented on GitHub (Jan 8, 2026):

@veerapan-boo are you using tmux? And what terminal?

<!-- gh-comment-id:3725758791 --> @kommander commented on GitHub (Jan 8, 2026): @veerapan-boo are you using tmux? And what terminal?
Author
Owner

@veerapan-boo commented on GitHub (Jan 9, 2026):

@kommander I use both Warp Terminal and iTerm Terminal.

<!-- gh-comment-id:3726847616 --> @veerapan-boo commented on GitHub (Jan 9, 2026): @kommander I use both Warp Terminal and iTerm Terminal.
Author
Owner

@kommander commented on GitHub (Jan 16, 2026):

This should be somewhat better (without tmux) in the latest opencode version. I have some more fixes coming.

<!-- gh-comment-id:3757825335 --> @kommander commented on GitHub (Jan 16, 2026): This should be somewhat better (without tmux) in the latest opencode version. I have some more fixes coming.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#891
No description provided.