[PR #17747] Use DECCRA/DECFRA for ScrollConsoleScreenBuffer #31350

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

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

State: closed
Merged: Yes


This adds logic to get the DA1 report from the hosting terminal on
startup. We then use the information to figure out if it supports
rectangular area operations. If so, we can use DECCRA/DECFRA to
implement ScrollConsoleScreenBuffer.

This additionally changes ScrollConsoleScreenBuffer to always
forbid control characters as the fill character, even in conhost
(via VtIo::SanitizeUCS2). My hope is that this makes the API
more consistent and robust as it avoids another source for
invisible control characters in the text buffer.

Part of #17643

Validation Steps Performed

  • New tests
**Original Pull Request:** https://github.com/microsoft/terminal/pull/17747 **State:** closed **Merged:** Yes --- This adds logic to get the DA1 report from the hosting terminal on startup. We then use the information to figure out if it supports rectangular area operations. If so, we can use DECCRA/DECFRA to implement ScrollConsoleScreenBuffer. This additionally changes `ScrollConsoleScreenBuffer` to always forbid control characters as the fill character, even in conhost (via `VtIo::SanitizeUCS2`). My hope is that this makes the API more consistent and robust as it avoids another source for invisible control characters in the text buffer. Part of #17643 ## Validation Steps Performed * New tests ✅
claunia added the pull-request label 2026-01-31 09:46:42 +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#31350