Skip to content

[host] Changing a color table value above 16 does not update the color of other cells with that index #1223

Closed

Description

From MSFT:20105972

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.

image
image

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.

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jun 12, 2019
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 12, 2019
  3. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 12, 2019
  4. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jun 12, 2019
  5. zadjii-msft commented on Dec 3, 2019

    @zadjii-msft
    MemberAuthor

    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.

  6. j4james commented on Dec 4, 2019

    @j4james
    Collaborator

    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.

  7. j4james commented on Apr 28, 2020

    @j4james
    Collaborator

    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.

  8. ghost added
    In-PRThis issue has a related PR
    on May 10, 2020
  9. ghost closed this as completedin #5834on May 27, 2020
  10. ghost added a commit that references this issue on May 27, 2020
    fa7c1ab
  11. ghost removed
    In-PRThis issue has a related PR
    on May 27, 2020
  12. ghost added
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    on May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-VTVirtual Terminal sequence supportIssue-BugIt either shouldn't be doing this or needs an investigation.Product-ConhostFor issues in the Console codebaseResolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions