ansi DEC double-height text lines cannot be un-set 😲 #23343

Closed
opened 2026-01-31 08:39:25 +00:00 by claunia · 4 comments
Owner

Originally created by @ClaireCJS on GitHub (Jun 5, 2025).

Windows Terminal version

No response

Windows build number

10.0.19045.5854

Other Software

No response

Steps to reproduce

  1. Create a line of double-height text:

Image

  1. After drawing, move back up and “type” over the first line of double-height text with something, to see some EXPECTED behavior that looks glitch but is as designed:

Image

  1. Try inserting the character that turns off DEC text. It’s impossible to “flip” this line in the console back to normal-height text. It’s stuck forever?

Image

No, not quite forever. The ansi erase to end of line sequence won’t fix it, but the ansi erase to end of screen sequence will.
[However, in my personal story where I’m actually the main character—unlike here—this wipes my status bar.]

Image

So yeah. Inconsistent a bit...

Sets the line back to normal sized:

  • erase to end of screen ansi sequence

Does not Set the line back to normal sized:

  • erase to end of line ansi sequence
  • the ansi sequence to set a line to normal-sized / not dec-double-sized

Expected Behavior

I’d expect all 3 of these to set the line to small — erase to EOL, erase end of screen, and the "big off" (escape # 0) sequence.

Image

Image

Image

Actual Behavior

Only 1 of the 3 worked and it had the unintended side effect of erasing things on the screen I did not want erased.

Originally created by @ClaireCJS on GitHub (Jun 5, 2025). ### Windows Terminal version _No response_ ### Windows build number 10.0.19045.5854 ### Other Software _No response_ ### Steps to reproduce 1) Create a line of double-height text: ![Image](https://github.com/user-attachments/assets/2d73d8c5-bc75-4a88-8e17-82e5733acff0) 2) After drawing, move back up and “type” over the first line of double-height text with something, to see some EXPECTED behavior that looks glitch but is as designed: ![Image](https://github.com/user-attachments/assets/334f101b-d364-4d65-8586-7b1f5c7d8581) 3) Try inserting the character that turns off DEC text. It’s impossible to “flip” this line in the console back to normal-height text. It’s stuck forever? ![Image](https://github.com/user-attachments/assets/8df6811a-7998-4fce-86ed-cf300a3337f3) No, not _quite_ forever. The ansi erase to end of line sequence won’t fix it, but the ansi erase to end of _screen_ sequence will. [However, in my personal story where I’m actually the main character—unlike here—this wipes my status bar.] ![Image](https://github.com/user-attachments/assets/8dae592e-6878-4490-ba1b-6a72b8b31663) So yeah. Inconsistent a bit... Sets the line back to normal sized: - erase to end of screen ansi sequence Does not Set the line back to normal sized: - erase to end of line ansi sequence - the ansi sequence to set a line to normal-sized / not dec-double-sized ### Expected Behavior I’d expect all 3 of these to set the line to small — erase to EOL, erase end of screen, and the "big off" (escape # 0) sequence. ![Image](https://github.com/user-attachments/assets/a97b4f32-817b-46ab-b355-4a9deed0043b) ![Image](https://github.com/user-attachments/assets/e749beb9-b917-4b5f-9dd9-df233e0a51c6) ![Image](https://github.com/user-attachments/assets/43efa2b6-f60f-4499-a299-003d9fe087c1) ### Actual Behavior Only 1 of the 3 worked and it had the unintended side effect of erasing things on the screen I did not want erased.
claunia added the Resolution-By-DesignNeeds-TriageIssue-Bug labels 2026-01-31 08:39:26 +00:00
Author
Owner

@similar-issues-ai[bot] commented on GitHub (Jun 5, 2025):

We've found some similar issues:

  • #15575 , similarity score: 83%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@similar-issues-ai[bot] commented on GitHub (Jun 5, 2025): We've found some similar issues: - #15575 , similarity score: 83% If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue. > Note: You can give me feedback by 👍 or 👎 this comment.
Author
Owner

@ClaireCJS commented on GitHub (Jun 5, 2025):

TL;DR: The only way to make a big line small again is to erase ’til end of screen, which is too much erasing

@ClaireCJS commented on GitHub (Jun 5, 2025): TL;DR: The only way to make a big line small again is to erase ’til end of screen, which is too much erasing
Author
Owner

@j4james commented on GitHub (Jun 6, 2025):

@ClaireCJS The sequence for resetting the line back to a normal width and height is DECSWL, which is \e#5 and not \e#0.

And erasing to the end of the line is not supposed to change the line height. This is documented in the DEC STD 070 reference manual on page 5-154 in the notes for the ERASE IN LINE control:

The line rendition is not affected by execution of this control.

@j4james commented on GitHub (Jun 6, 2025): @ClaireCJS The sequence for resetting the line back to a normal width and height is [DECSWL](https://vt100.net/docs/vt510-rm/DECSWL.html), which is `\e#5` and not `\e#0`. And erasing to the end of the line is not supposed to change the line height. This is documented in the DEC STD 070 reference manual on page 5-154 in the notes for the ERASE IN LINE control: > The line rendition is not affected by execution of this control.
Author
Owner

@DHowett commented on GitHub (Jun 6, 2025):

Thanks @j4james! Sounds like there's nothing for us to do here then, eh?

@DHowett commented on GitHub (Jun 6, 2025): Thanks @j4james! Sounds like there's nothing for us to do here then, eh?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23343