-
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
selectionBackground doesn't match settings.json setting? #11181
Comments
Yeah. This is sorta silly. The selection color is blended at something-percent opacity with the text because we draw it in a final pass on top of everything. We have plans to make it better. |
I kinda like the light blue in the Campbell Powershell scheme. |
Actually, I also kinda like the apparent averaging of selectionBackground (#FFFFFF) with the background (#000000) in Vintage. So I'm not eagerly awaiting a change. But I wonder ... can I change selectionBackground, on-the-fly, with a control sequence? If not, how about adding OSC13; that could be "chained" with OSC10/11/12. With that, I could change the whole scheme under program control. |
I guess that;s moot since all the builtin ones are #FFFFFF. :-) |
Nope. iTerm2
Boy that's a gross sequence though. Does take care of #6574 though, with Tempted to convert #6574 to "implement support for iTerm2's SetColors sequence" close this as a dupe of #6574. |
XTerm uses Edit: I should add that there's both a foreground and background highlight color ( |
Heehee! I guess if you want to set 19 colors (as I do, or more) it's going to get ugly. I'm timing with the performance counter and the code below takes (on average) 90 microsecconds (@3.5GHz). I tried like heck to make it faster but I can't. Even using a
Does the terminal ever see control sequences? A sequence for the "setColorScheme" action would make life easy for anyone who wanted to do this sort of thing. |
However: you can also combine OSC 4 sequences. |
Ya know, I tried exactly (I think) that at a command line and it didn't seem to work. I'll try again, a little harder.
I'm a bit obsessed with time and I have a lot of it on my hands. 😁 |
Yeah, it does work. Thanks! I'm confident I won't see a decrease in the time to construct and emit the sequence. But my guess is that it would save a lot of time on the other end, when the sequence is processed ... yes/no? |
@DHowett said:
@vefatica said:
Whoa! That made a significant difference, bringing 90 microseconds down to 75 microseconds (new code below). And I think I've answered my question in the affirmative. I doubt I saved much in constructing the sequence, so I figure the saving is in the WriteConsole. Is that right ... WriteConsole (to a "CONOUT$" handle) doesn't return until the sequence has been processed (and the sequence is being processed much faster because of the chaining)? Here's the new code. I'm timing 100 of them and taking an average.
|
FWIW I know that this one doesn't have the same title, but we're aggregating "change how selection background works" over in /dup #3571 You're right: WriteConsole doesn't return until all console handling is complete, synchronously. That's something we're keen on changing. :) |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Did you get that right? That thread and the one it dups don't mention selectionBackground and don't otherwise seem to deal with it. |
Whoops, that was my bad. I typoed #3561. |
…a overlay (#17725) With the merge of #17638, selections are now accumulated early in the rendering process. This allows Atlas, which currently makes decisions about cell foreground/background at the time of text rendering, awareness of the selection ranges *before* text rendering begins. As a result, we can now paint the selection into the background and foreground bitmaps. We no longer need to overlay a rectangle, or series of rectangles, on top of the rendering surface and alpha blend the selection color onto the final image. As a reminder, "alpha selection" was always a stopgap because we didn't have durable per-cell foreground and background customization in the original DxEngine. Selection foregrounds are not customizable, and will be chosen using the same color distancing algorithm as the cursor. We can make them customizable "easily" (once we figure out the schema for it) for #3580. `ATLAS_DEBUG_SHOW_DIRTY` was using the `Selection` shading type to draw colored regions. I didn't want to break that, so I elected to rename the `Selection` shading type to `FilledRect` and keep its value. It helps that the shader didn't have any special treatment for `SHADING_TYPE_SELECTION`. This fixes the entire category of issues created by selection being an 80%-opacity white rectangle. However, given that it changes the imputed colors of the text it will reveal `SGR 8` concealed/hidden characters. Refs #17355 Refs #14859 Refs #11181 Refs #8716 Refs #4971 Closes #3561
The name suggests that selectionBackground will be the backGround of selected text. It often isn't. Here's Powershell and Campbell Powershell. Settings.json has bright white and I see light blue.
And can selectionBackground be set with a control sequence?
The text was updated successfully, but these errors were encountered: