Skip to content

Stale glyphs when replacing placeholder with shorter text #635

@kitlangton

Description

@kitlangton

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

Metadata

Metadata

Assignees

No one assigned

    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