Skip to content

Theme demo needs to be adjusted so that only unmatched quote is an error #8260

Closed

Description

@haoadoreorange

Please tell us which fish version you are using by executing the following:

3.3.1

Please tell us which operating system and terminal you are using. The output of uname -a and echo $TERM may be helpful in this regard although other commands might be relevant in your specific situation.

MANJARO #1 SMP PREEMPT Sun Aug 15 13:15:18 UTC 2021 x86_64 GNU/Linux
xterm-256color

Tell us how to reproduce the problem. Including an asciinema.org recording is useful for problems that involve the visual display of fish output such as its prompt.

The terminal's text color is incorrect when not closing quote.

  • this is what's supposed to be (show up in fish_config)
    image
  • this is the real result (only quote is colored)
    image

Activity

  1. faho commented on Aug 29, 2021

    @faho
    Member

    Most likely:

    Your terminal isn't detected as truecolor capable, so fish sends the colors as one from the palette, and you've set the palette to something else. We have no way to detect that or deal with it.

    Either set -g fish_term24bit 1, which will make fish send the color as RGB, so the terminal can't mess it up. If that doesn't work, switch to a better terminal.

    Or fix your palette so it lines up.


    Either that, or something changed your colors - check your third party stuff. Oh-my-fish and friends.

  2. haoadoreorange commented on Aug 29, 2021

    @haoadoreorange
    Author

    The thing is, the color doesn't come from the palette, it comes from fish as the color set for text in quote.
    I'm running fish vanilla, so there is no 3rd party involved here.
    Edit: typo

  3. faho commented on Aug 29, 2021

    @faho
    Member

    The thing is, the color doesn't come from the palette, it comes from fish as the color set for text in quote.

    No, if fish doesn't deduce that it can give the terminal 24-bit/truecolor/RGB sequences, then it can only give the color as one of the 256 colors (or 16 colors if your terminal is limited) from the palette, and the only way to do that is to map the color (which the colorscheme defines in RGB) to fish's idea of the terminal's colors (IIRC the default xterm palette), so it can then send a color sequence to the terminal.

    Then the terminal gets that color, and picks from its palette again.

    So: Either get it to do RGB, or fix your palette.

    (even if fish didn't do that mapping internally, we'd have to do that when displaying in the browser - there is no way to get your terminal palette and while there are ways to set it they're awkward hacks and not universally supported. the point is that rgb color is the only good way to get colors to line up. not to mention that, if we didn't do that mapping, we still wouldn't end up with the color the colorscheme was meant to use)

  4. haoadoreorange commented on Aug 29, 2021

    @haoadoreorange
    Author

    I will try it on another terminal. Do you have one that is guaranteed working ?

  5. page-down commented on Aug 30, 2021

    @page-down
    Contributor

    Sorry, I don't quite understand why it has to do with true colors or palettes. It seems to me that the issue mentioned here is the text after the single unmatched quotation mark, which should be recognized as an error, not the quoted text.

    From the screenshot, you can see that the text color is rendered correctly as quoted text. (This refers only to the color.) The error section has only a single quote, but is also rendered correctly as the error color.

    Here is a screenshot where I have configured "fish_term24bit".

    The expectation is that unmatched quoted text should be recognized as an error, as shown in "fish_config".

    If it can be correctly identified as an error, the color will not be a problem.

  6. faho commented on Aug 30, 2021

    @faho
    Member

    Aaaah, okay, yeah: 822b53c (included in 3.1.0) made it so only the unmatched quote is an error.

    We should adjust the highlighting in the browser to match.

  7. added
    bug
    and removed on Aug 30, 2021
  8. changed the title [-][Bug] Terminal text's color incorrect with opening quote[/-] [+]Theme demo needs to be adjusted so that only unmatched quote is an error[/+] on Aug 30, 2021
  9. added this to the fish-future milestone on Aug 30, 2021
  10. modified the milestones: fish-future, fish 3.4.0 on Sep 3, 2021
  11. added a commit that references this issue on Dec 12, 2021
  12. locked as resolved and limited conversation to collaborators on Sep 5, 2022
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions