New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erase in Line CSI sequence does not erase line content beyond the terminal width #480
Comments
I retested, and I was wrong about xterm. Actually, it doesn't restore truncated line content when shrinking and expanding a terminal, so it's not relevant to this issue. |
Fixed: test script:
|
Looks good to me. Thanks. I also looked at how Konsole and gnome-terminal (an old version that didn't rewrap lines) handled some of the other CSI sequences, and curiously, Delete Characters (P) would slide obscured content into view, but Insert Characters (@) and insert mode (h/l) instead cleared the obscured characters. The two terminals handled Erase Characters (X) differently, with gnome-terminal matching the new mintty behavior, and Konsole clearing all the obscured characters. I have no idea if behavior is intentional. The new mintty behavior seems fine to me. |
Thanks for the feedback. |
Released in 2.2.1. |
I noticed that with mintty, the Erase in Line CSI sequence (
\x1b[<n>K
) only erases the currently visible part of the line. If the line extends past the right end of the window, those characters aren't erased. If the window is later expanded horizontally, the previously invisible part of the erased line comes back into view.This behavior seems wrong to me. It also doesn't match what other terminals do (particularly, xterm, VTE, and Konsole).
Like mintty, xterm also keeps track of obscured line content beyond the right edge of the terminal, but both
\x1b[0K
and\x1b[2K
erase the obscured characters.Example:
FWIW: This issue is affecting my winpty project, which frequently rewrites lines when the terminal/console is resized.
The text was updated successfully, but these errors were encountered: