[PR #3015] Don't put NUL in the buffer in VT mode #25207

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

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

State: closed
Merged: Yes


Summary of the Pull Request

Filter NUL from the stream when emitted in VT processing mode. Linux terminals can't really have a NUL in their "buffer" - the NUL characters are just ignored. For this particular bug, screen was writing a long sequence of NUL bytes as effectively a timeout, so that it could "flash" the screen.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

This PR is here for discussion - I'm a tad bit worried that it might regress some scenario unintentionally. cmd.exe uses VT processing for its own scripts and internal commands, is there something here we might be breaking? I doubt it, but I'm unsure.

Validation Steps Performed

  • tested on a centos VM with screen to ensure this actually fixes the problem at hand.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/3015 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Filter NUL from the stream when emitted in VT processing mode. Linux terminals can't really have a NUL in their "buffer" - the NUL characters are just ignored. For this particular bug, `screen` was writing a long sequence of NUL bytes as effectively a timeout, so that it could "flash" the screen. ## References ## PR Checklist * [x] Closes #1825 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments This PR is here for discussion - I'm a tad bit worried that it might regress some scenario unintentionally. `cmd.exe` uses VT processing for its own scripts and internal commands, is there something here we might be breaking? I _doubt_ it, but I'm unsure. ## Validation Steps Performed * tested on a centos VM with `screen` to ensure this actually fixes the problem at hand.
claunia added the pull-request label 2026-01-31 09:07: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#25207