Skip to content

[macOS Terminal.app] IME composition corrupts TUI layout; stale cells remain after commit (diff render) #29697

Closed as not planned

Description

@JohnLee1243

Description

When using a CJK IME (e.g. macOS Chinese Pinyin) in the home/session prompt on macOS Terminal.app, the prompt line and the UI to its right are pushed horizontally during composition (before confirming a candidate). After confirming a character, most of the layout snaps back, but cells that were pushed past the terminal’s drawable area are not repainted by OpenTUI and keep Terminal.app’s default background (often visible as a yellow-ish block at the end of the line / misaligned right border).
This looks like a terminal emulator + diff-rendering interaction, not a simple “wide character width” bug in the prompt component alone.

Plugins

No response

OpenCode version

1.15.10

Steps to reproduce

  1. Open the home screen.
  2. Switch to Chinese – Pinyin input source.
  3. Type Pinyin without confirming a candidate (e.g. nihao) so the IME preedit/candidate window is active.
  4. Observe the prompt line: preedit text + placeholder (if any) and the right border of the box shift to the right.
  5. Confirm one Han character (e.g. 你好).
  6. Observe that the line mostly returns to normal, but trailing cells (past where the border should be) still show Terminal default background instead of the TUI theme background; the right border can remain misaligned on that row.

Screenshot and/or share link

Image Image

Operating System

macOS Sequoia 15.7.5

Terminal

macOS Terminal.app

Activity

  1. github-actions commented on Jul 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions