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
DEC double-height lines do not properly reset #15575
Comments
Observation - if you make the 1st line of the screen big, no matter hw many times you clear the screen, that first line is STUCK as big. At least in my case, where i'm only echo'ing a few lines prior to clearing the screen repeatedly (and thus never causing the screen to scroll) |
@j4james I'm having trouble reproducing this one; have you seen anything like this before? |
If escape symbol entered with Command.Prompt.2023-06-19.19-47-02.mp4 |
I can consistently reproduce this infinitely. Any line that is set to double-height remains set as double-height until it is scrolled away. KEEP.-.windows.terminal.double-height.bug.mp4 |
And here i am reproducing it infinitely: KEEP.-.windows.terminal.double-height.bug.2.mp4 |
Amazing! Okay, I have a hunch. I bet your shell is clearing the screen in one of the ways we cannot automatically detect1 as a clear. Footnotes
|
I haven't had a chance to look at the code yet, but this would be my guess too. Frankly I'd be surprised if the line attributes were cleared by anything other than the VT erase sequences - I wasn't really expecting these operations to interoperate with the legacy console APIs. It would be nice if we could make them work at least some of the time though. |
Hi! Great hunch! The TCC command-line is very heavily supported, even if it's userbase is small. They often answer support forum posts within a day or two. I left a message asking if someone with inside knowledge would roll in here and leave a comment answering your question! I think we can figure this out!! :) |
Wow, that was fast! I was using a plain CLS. This is directly from the TCC author: "If you use CLS /S, TCC scrolls the screen using the Windows ScrollConsoleScreenBuffer API. If you use CLS /C, TCC uses the Windows FillConsoleOutputCharacterW and FillConsoleOutputAttribute APIs to write the entire console buffer to blanks with the desired attribute. A plain CLS uses the Windows FillConsoleOutputCharacterW and FillConsoleOutputAttribute APIs to write the current screen window to blanks with the desired attribute." I checked, and regardless of /C or /S options, I still get the same behavior. |
I've had a chance to look at the code now, and I can see that the cmd Then I've also had a look at the two PowerShell versions, and they both use I think what we need to do now is see exactly what TCC is doing, figure out why |
It looks like you are absolutely correct! Someone over on the TCC forum side of things mentioned that you can clear just the window with an ansi code: "\x1b[H\x1b[0J" When I cleared it this way, the bug is consistently gone. So I think your hunch seems dead on. The TCC thread, by the way, is over here: |
I've tested my hack on TCC now and it doesn't help. The way TCC clears the screen with So to make TCC work as expected, we'd probably have to reset the line renditions for any |
I'm cool with that. @lhecker, does that make sense? |
Yeah absolutely. I don't know what the release cycle for TCC is, but I would personally greatly prefer if they could scroll off the text buffer in a single call instead, just like cmd.exe does. With #15524 in place, I want to start to properly decommit memory in the future whenever So yeah, I'd be happy if we were to fix the bug this way, but I feel like it'd be more optimal if TCC changed its approach to clearing the buffer. And it would benefit TCC too by reducing the total working set to a minimum every time |
How does that happen? What about clearing via VT control sequences? |
You mean how it would work if someone were to scroll off the entire contents? We could detect such API calls and short-circuit them as a call to Thinking about it and what James said, I feel like a combination of both approaches would be optimal. The interaction between VT sequences and console APIs is unclear at the moment and we should consider resetting these VT related attributes like with the row-wide |
Windows Terminal version
1.17.11461.0
Windows build number
10.0.19045.3086
Other Software
No response
Steps to reproduce
Create DEC double-height text via an echo command. (It can be tricky to echo the escape character.)
Clear screen, do a directory.
Watch as double-height line artifacts that shouldn't be there are there.
Not just once. Multiple double-height lines can keep reoccurring.
Expected Behavior
The expected behavior is one the line is finished rendering, no double-height letters would ever appear again except if another line is issued with the escape code to turn that double-height letters on.
Actual Behavior
The actual behavior is that after the line is finished rendering, double-height letters still keep appearing -- often many many many times -- even without another line issued with the escape code to turn double-height letters on.
The text was updated successfully, but these errors were encountered: