-
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
Bugfix: CLS should clear current active buffer #2729
Conversation
added test
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.
approving contingent upon changing that one line
Is this indicative of a larger problem? Should we file an outstanding work item to audit all sites of manipulating the active buffer and/or somehow change the design such that the methods cannot accidentally be called without resolving which one is the active one first? |
For the latter, my proposal would be to hide all the verbage methods off the base class and implement some sort of interface that holds them that is only returned when/if someone has correctly queried for the active one first. I'd accept competing proposals, though. |
CLS calls two functions: - `SetConsoleCursorPositionImpl()` - `ScrollConsoleScreenBufferWImpl()` Both of these were not checking which buffer to apply to (main vs active buffer). Now we get the active buffer and apply the changes to that one. Also, we forgot to switch out of the alt buffer in the previous test. Added that in. Closes #1189. (cherry picked from commit 3d35e39)
🎉 Handy links: |
Summary of the Pull Request
CLS calls two functions:
SetConsoleCursorPositionImpl()
ScrollConsoleScreenBufferWImpl()
Both of these were not checking which buffer to apply to (main vs active buffer).
Now we get the active buffer and apply the changes to that one.
Also, we forgot to switch out of the alt buffer in the previous test. Added that in.
PR Checklist
Requires documentation to be updatedValidation Steps Performed
manually performed what is described in the attached bug report.
Also ran automated test.