You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[host] Changing a color table value above 16 does not update the color of other cells with that index #1223
in bash:
printf "\033[38;5;130mHello World"
printf "\033]4;130;rgb:ff/ff/00\07"
The first "Hello World" should appear in a brownish color. Then, after executing the second command, the value of the [130] entry should be updated to yellow. The hello world text should also be yellow now.
We could achieve this by allowing for TextColor's to have up to 256 stored in their _index member. I'm not sure we'd need more than that - though LookupColor might be confused by that, so we'd need to maybe add a separate is256Index value to the type enum.
James Holderness (@j4james) just for the record - I think you have a prototype branch floating around for this bug, from discussion in #3717. I also had a prototype branch for this that didn't end up making the cut of the last Windows release. I'm not really planning on investigating anytime soon, but feel free to poke through and compare.
I was just experimenting, and nuked the code afterwards, but it was very close to your prototype actually. One slight difference was that I didn't want to touch the _ColorTable inside the memcpy area, so just stuck an extra buffer afterwards and let it overflow.
That felt horrible, though, which is one of the reasons I didn't want to keep it. But I also strongly suspect that memcpy comment was bogus and could really be ignored. As far as I can see, the shortcut properties should be initialized via the InitFromStateInfo method, and that clearly handles each field individually.
Anyway, the bottom line is I'm not planning on looking at this anytime soon either. I've got a few other things I'm playing with at the moment that I'd like to try and finish first. But I'll keep it on my todo list for the future, assuming you don't get back to it first.
FYI, I'm looking into this again now. I've been working on a couple of PRs that are steps towards fixing #2661, and I think this conhost color table issue is the last major roadblock.
Activity
Start working on #1223
Use the entire 256 table to lookup the color
zadjii-msft commentedon Dec 3, 2019
James Holderness (@j4james) just for the record - I think you have a prototype branch floating around for this bug, from discussion in #3717. I also had a prototype branch for this that didn't end up making the cut of the last Windows release. I'm not really planning on investigating anytime soon, but feel free to poke through and compare.
j4james commentedon Dec 4, 2019
I was just experimenting, and nuked the code afterwards, but it was very close to your prototype actually. One slight difference was that I didn't want to touch the
_ColorTableinside the memcpy area, so just stuck an extra buffer afterwards and let it overflow.That felt horrible, though, which is one of the reasons I didn't want to keep it. But I also strongly suspect that memcpy comment was bogus and could really be ignored. As far as I can see, the shortcut properties should be initialized via the
InitFromStateInfomethod, and that clearly handles each field individually.Anyway, the bottom line is I'm not planning on looking at this anytime soon either. I've got a few other things I'm playing with at the moment that I'd like to try and finish first. But I'll keep it on my todo list for the future, assuming you don't get back to it first.
j4james commentedon Apr 28, 2020
FYI, I'm looking into this again now. I've been working on a couple of PRs that are steps towards fixing #2661, and I think this conhost color table issue is the last major roadblock.
Refactor the SGR implementation in AdaptDispatch (#5758)
Fix SGR indexed colors to distinguish Indexed256 color (and more) (#5834
Refactor the SGR implementation in AdaptDispatch (microsoft#5758)
Fix SGR indexed colors to distinguish Indexed256 color (and more) (mi…