-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the correct background color when copying to clipboard #11991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time you touch text attributes they improve, so I'm happy. Thanks!
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
When copying content from the terminal to the clipboard (with formatting), a default background color needs to be set to fill the unused area of the pasted block. Prior to this PR, that color was not correctly set, so the pasted content did not match what was seen on screen. Windows Terminal previously used the default background from the initial color scheme, so it didn't take palette changes into account. OpenConsole did use the active default color, but didn't take the reverse screen mode into account, so could end up using the foreground rather than the background color. In both case I've changed the code to lookup the runtime colors in the same way that renderer does, so they should now match what is seen on screen. I've manually confirmed that the background color is now correctly set when copying from both Windows Terminal and OpenConsole. Closes #11988 (cherry picked from commit b61b24e)
🎉 Handy links: |
When copying content from the terminal to the clipboard (with
formatting), a default background color needs to be set to fill the
unused area of the pasted block. Prior to this PR, that color was not
correctly set, so the pasted content did not match what was seen on
screen.
Windows Terminal previously used the default background from the initial
color scheme, so it didn't take palette changes into account.
OpenConsole did use the active default color, but didn't take the
reverse screen mode into account, so could end up using the foreground
rather than the background color.
In both case I've changed the code to lookup the runtime colors in the
same way that renderer does, so they should now match what is seen on
screen.
Validation Steps Performed
I've manually confirmed that the background color is now correctly set
when copying from both Windows Terminal and OpenConsole.
Closes #11988