Skip to content

[bug] Prompt redraw after command output emits \[ \] ignore-markers as printable glyphs (☺←•) with escape text - 22/82 themes show garbage on prompt#3 #422

Closed

Description

@caomengxuan666

Found by wt53/themesweep (2026-10-03) ConPTY render sweep (pywinpty+pyte, settled screens; corpus abf8461; GNU 5.3.0 oracle).

Shape

The FIRST prompt after rcfile and the prompt after echo S-MARK render correctly, but the prompt drawn after real command output (ls) arrives as:

  • a burst of ESC[?7l / ESC[?7h (autowrap toggles), then
  • the prompt WITH the readline ignore-markers emitted as printable glyphs: ☺←]0;/d/repo/.../fixture-repo•☻☺←[0;91m☻☺←[39m☻... — i.e. \x01/\x02 (and BEL) rendered as ☺ ← • ☻ characters, and ESC[0;91m appearing as literal text [0;91m.

GNU in the same session renders prompt#3 identically to prompt#1/2 (OSC title consumed, no glyph garbage). pyte screens: rb shows ☺←]0;<PATH> rows; gnu shows the clean prompt.

22/82 themes hit this in the sweep (tylenol, wanelo, simple, ... see render-verdicts.json 'redraw-glyph-leak').

Suspect surface

The echo/redraw path of script_driver.rs run_interactive_stdin (the PS1-rendering reader) — the post-command redraw seems to re-emit the raw prompt string including the [ ] marker bytes, encoded as glyphs, unlike the first draw. Related reading: #418 (PS1 with literal " $'...' " content), #419 (console path placeholder) — but this reproduces on the reader that DOES render PS1, on its redraw leg.

Raw artifacts

  • Stream: target/issue-suites/results/themesweep/render/rb/simple/stream.bin (readable dump in THEMES-SWEEP.md Part B)
  • Screens: render/{rb,gnu}/simple/screen3.txt; verdict matrix render/render-verdicts.json

Activity

  1. added
    bug
    on Oct 3, 2026
  2. caomengxuan666 commented on Oct 3, 2026

    @caomengxuan666
    MemberAuthor

    Fixed by e57d291 ([ ] ignore markers stripped at the terminal write only, per readline display.c:437-463; public expand API still returns markers for width accounting): the 22-theme glyph-leak class from the wt53 sweep; ConPTY replay of the real theme renders structurally identical to GNU. Ships in 1.3.2.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions