Skip to content
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

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Fix clear buffer command #17884

merged 2 commits into from
Sep 24, 2024

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Sep 9, 2024

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. ✅

@microsoft-github-policy-service microsoft-github-policy-service bot added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Sep 9, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Area-Accessibility Issues related to accessibility label Sep 10, 2024
Copy link
Member

@DHowett DHowett left a 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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Sep 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Sep 23, 2024
@lhecker lhecker removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Sep 24, 2024
@lhecker
Copy link
Member Author

lhecker commented Sep 24, 2024

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).

Copy link
Member

@DHowett DHowett left a 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!

@DHowett DHowett merged commit 4259ce5 into main Sep 24, 2024
20 checks passed
@DHowett DHowett deleted the dev/lhecker/17867-clear-buffer branch September 24, 2024 19:11
DHowett pushed a commit that referenced this pull request Sep 24, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Issues related to accessibility Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
Status: Rejected
Development

Successfully merging this pull request may close these issues.

Clear Buffer is broken in Windows Terminal Preview (1.22.2362.0)
3 participants