Bugfix: CLS should clear current active buffer#2729
Conversation
added test
zadjii-msft
left a comment
There was a problem hiding this comment.
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.