Skip to content

First line of output is not colored despite VT color codes #11211

@heaths

Description

@heaths

Windows Terminal version (or Windows build number)

1.10.2383.0

Other Software

No response

Steps to reproduce

1, Clone and checkout PR microsoft/vswhere#244 (a minimal repo would be to enable VT and write the first line of text with colors).
2. Build and run vswhere.exe -color -format xml

Despite enabling virtual terminal processing, the first line of output - if it's otherwise supposed to be colored - is not - not for the first Write call to the console.

Example: the processing instruction should be colorized and is written in a single call:

image

If I write a blank line prior to that - any text, really - it is colored as expected:

image

Expected Behavior

VT-colored output is always colored as shown below:

image

Actual Behavior

The first line - if no other text was written first (even a blank line, so just any call to Write) - is in the default foreground color.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-AttentionThe core contributors need to come back around and look at this ASAP.Needs-Tag-FixDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions