Teach PSReadline to not force the background color during render#1626
Merged
daxian-dbw merged 2 commits intoPowerShell:masterfrom Jul 3, 2020
DHowett:master
Merged
Teach PSReadline to not force the background color during render#1626daxian-dbw merged 2 commits intoPowerShell:masterfrom DHowett:master
daxian-dbw merged 2 commits intoPowerShell:masterfrom
DHowett:master
Conversation
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). Fixes #830.
This comment has been minimized.
This comment has been minimized.
We'll also teach the various console implementations how to handle it.
Contributor
Author
|
Alright, I went with a different approach. SGR
|
Contributor
Author
daxian-dbw
approved these changes
Jul 3, 2020
Member
daxian-dbw
left a comment
There was a problem hiding this comment.
@DHowett Thanks for the contribution!
6 tasks
Closed
3 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_PROCESSINGis 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