-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Clear Buffer is broken in Windows Terminal Preview (1.22.2362.0) #17867
Comments
@valiko-ua it's not the key binding. In |
I think the problem is explained by the comment here: terminal/src/cascadia/TerminalControl/ControlCore.cpp Lines 2232 to 2238 in 544452d
In the past when you asked conpty to clear its buffer, the vtengine would have pushed back an update that also cleared the buffer in the connected terminal, but that's not happening anymore. On the conhost side, the terminal/src/host/PtySignalInputThread.cpp Lines 185 to 201 in 544452d
Which just calls the terminal/src/host/screenInfo.cpp Lines 2142 to 2162 in 544452d
That's just going to clear the conhost buffer. As far as I can see, there's nothing in that code that will emit sequences to sync it up with the terminal buffer. |
Without a VT "renderer" there's no implicit output anymore when calling `ClearPseudoConsole`. The fix is trivial, but it works slightly different from before: Previously, we would preserve the line the cursor is on, while this PR doesn't do that. I felt like there's not much merit in preserving the line, because it may be a multi-line prompt which won't work with that. Closes #17867 ## Validation Steps Performed Bind 3 different actions to the 3 variants of "Clear buffer" and test them. They work. ✅ (cherry picked from commit 4259ce5) Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgS3NbU Service-Version: 1.22
Windows Terminal version
1.22.2362.0
Windows build number
10.0.22631.4037
Steps to reproduce
Expected Behavior
Clear Buffer works fine in Windows Terminal v.1.20.11781.0.
Actual Behavior
Clear Buffer does not work in Windows Terminal Preview v.1.22.2362.0.
The same problem can be reproduced with "Ubuntu 24.04 LTS" tab (WSL2).
I've just noticed that pressing Ctrl+Shift+L works differently from Ctrl+L (but still broken). And I didn't assign Ctrl+Shift+L to anything.
The text was updated successfully, but these errors were encountered: