Repository navigation
Prompt redraw (OSC133) leaves lines from old prompt #13460
Replies: 1 comment
|
The bisect to I would approach the fix in two small steps:
That test should use the same terminal-screen path as the real resize event rather than only testing a helper in isolation. It should also cover both a prompt that fits on one row and one that wraps, because the bug only appears in the latter case. I would not look for a user-facing config workaround first; the report already has a minimal reproduction and a source-level regression point. A focused PR with the test plus the smallest ordering fix would be the right next step. |
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
If the prompt wraps when resizing the terminal, extra lines from the old prompt are left in the scrollback history after redrawing.
I can confirm that this bug was introduced by dde3d4d. Before, the prompt was cleared before resizing pages, and thus before wrapping text. From reading the commit, I believe the new order of operations makes it easier to recover from a failed resize, and so I'm not sure how to proceed. I'm happy to contribute a fix after we settle on a solution.
Expected Behavior
No extra lines are left in the scrollback history. Example from commit 89b103d (parent of commit dde3d4d that introduced the bug):
Screencast.From.2026-07-26.03-04-10.mp4
Actual Behavior
Extra lines are being left in the scrollback history.
Screencast.From.2026-07-26.03-03-43.mp4
Reproduction Steps
Ghostty Logs
No response
Ghostty Version
OS Version Information
Arch Linux
(Linux only) Display Server
Wayland
(Linux only) Desktop Environment/Window Manager
GNOME 50.3
Minimal Ghostty Configuration
# default configurationAdditional Relevant Configuration
I acknowledge that:
```) on separate lines.All reactions