[PR #2729] Bugfix: CLS should clear current active buffer #25056

Open
opened 2026-01-31 09:06:58 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/2729

State: closed
Merged: Yes


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

Validation Steps Performed

manually performed what is described in the attached bug report.

Also ran automated test.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/2729 **State:** closed **Merged:** Yes --- ## 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. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1189 * [x] CLA signed. * [x] Tests added/passed * [x] ~Requires documentation to be updated~ * [x] I am a core contributor. ## Validation Steps Performed manually performed what is described in the attached bug report. Also ran automated test.
claunia added the pull-request label 2026-01-31 09:06:58 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25056