Teach PSReadline to not force the background color during render #1626
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
Upcoming versions of the Windows Console will be able to differentiate
a color set by the Win32 API from a color set by VT. This code
transforms a Win32 color into a VT color, and then uses that VT color
during rendering. When an enlightened console host receives this VT, it
may handle it differently (translate it differently, reverse it
differently, store it differently).
I've switched the defaults over to "39;49" (the well-supported SGR
codes for "foreground, background to default") and taught the two
console translators how to handle them. I went back to the Windows
source code and confirmed: conhost supports 39;49 everywhere
ENABLE_VIRTUAL_TERMINAL_PROCESSING
is supported.The first commit that introduced 39/49 is in Windows 10 TH2, the very
same release that introduced VT handling.
There's a lot more information in #830 (comment)
Fixes #830.
Related to microsoft/terminal#5952
PR Checklist
Microsoft Reviewers: Open in CodeFlow