-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Fix clear buffer command #17884
Fix clear buffer command #17884
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I somewhat disagree with the merit thing. I believe we keep the line because other terminal emulators do the same thing.
I've oriented myself on gnome-terminal which doesn't preserve the current line when running the Reset & Clear action (its closest equivalent). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's give it a shot then!
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
Without a VT "renderer" there's no implicit output anymore when
calling
ClearPseudoConsole
. The fix is trivial, but it worksslightly 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. ✅