[GH-ISSUE #635] Stale glyphs when replacing placeholder with shorter text #940

Closed
opened 2026-03-14 09:05:44 +03:00 by kerem · 0 comments
Owner

Originally created by @kitlangton on GitHub (Feb 6, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/635

I was adding mode-specific placeholder text in opencode, such that shell mode shows a relevant bash example rather than the normal prompt example.

That exposed a rendering bug in OpenTUI: when switching from the longer normal-mode placeholder to the shorter shell-mode placeholder, trailing characters from the old placeholder stayed visible. Example:

1. Build mode placeholder (all good)

CleanShot 2026-02-05 at 18 55 20@2x

2. When switching to bash mode (OH NO! DEAR GOD NO!)

image

As you can see, the last bits of "Fix broken tests" aren't cleared as one might expect, leaving us with the hideous: Run a command... "pwd"roken tests

Originally created by @kitlangton on GitHub (Feb 6, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/635 I was adding mode-specific placeholder text in opencode, such that shell mode shows a relevant bash example rather than the normal prompt example. That exposed a rendering bug in OpenTUI: when switching from the longer normal-mode placeholder to the shorter shell-mode placeholder, trailing characters from the old placeholder stayed visible. Example: **1. Build mode placeholder** (all good) <img width="1620" height="416" alt="CleanShot 2026-02-05 at 18 55 20@2x" src="https://github.com/user-attachments/assets/a2fcc14d-6f59-4ee3-8f50-5d24fd8c3fea" /> **2. When switching to bash mode** (OH NO! DEAR GOD NO!) <img width="483" height="299" alt="image" src="https://github.com/user-attachments/assets/a3c34b82-5b81-4e9c-aa0e-a34ca9ac10f7" /> As you can see, the last bits of `"Fix broken tests"` aren't cleared as one might expect, leaving us with the hideous: `Run a command... "pwd"roken tests`
kerem closed this issue 2026-03-14 09:05:50 +03:00
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#940
No description provided.