[PR #15075] Filter out control characters that don't do anything #30388

Closed
opened 2026-01-31 09:40:31 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


On a real VT terminal, most of the control characters that don't do
anything are supposed to be filtered out, and not written to the buffer.
Up to to now, though, we've only been filtering out NUL. This PR
extends our control processing to filter the remaining characters that
aren't supposed to be displayed.

We introduced filtering for the NUL control in PR #3015.

The are two special cases worth mentioning.

  1. The SUB control's main purpose is to the cancel a control sequence
    that is in progress, but it also needs to output an error character (a
    reverse question mark) to the display.

  2. The DEL control is typically filtered out, but when a 96-character
    set is designated, it can sometimes be mapped to a printable glyph that
    needs to be displayed.

Validation Steps Performed

I've manually tested that all the controls that are meant to be filtered
out are no longer being displayed.

I've also extended the existing NUL unit test to cover the full set of
controls characters that are supposed to be filtered.

Closes #10786

**Original Pull Request:** https://github.com/microsoft/terminal/pull/15075 **State:** closed **Merged:** Yes --- On a real VT terminal, most of the control characters that don't do anything are supposed to be filtered out, and not written to the buffer. Up to to now, though, we've only been filtering out `NUL`. This PR extends our control processing to filter the remaining characters that aren't supposed to be displayed. We introduced filtering for the `NUL` control in PR #3015. The are two special cases worth mentioning. 1. The `SUB` control's main purpose is to the cancel a control sequence that is in progress, but it also needs to output an error character (a reverse question mark) to the display. 2. The `DEL` control is typically filtered out, but when a 96-character set is designated, it can sometimes be mapped to a printable glyph that needs to be displayed. ## Validation Steps Performed I've manually tested that all the controls that are meant to be filtered out are no longer being displayed. I've also extended the existing `NUL` unit test to cover the full set of controls characters that are supposed to be filtered. Closes #10786
claunia added the pull-request label 2026-01-31 09:40:31 +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#30388