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
Theme demo needs to be adjusted so that only unmatched quote is an error #8260
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)
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.
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
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)
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.
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
Activity
faho commentedon Aug 29, 2021
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.
haoadoreorange commentedon Aug 29, 2021
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
faho commentedon Aug 29, 2021
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)
haoadoreorange commentedon Aug 29, 2021
I will try it on another terminal. Do you have one that is guaranteed working ?
page-down commentedon Aug 30, 2021
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.
faho commentedon Aug 30, 2021
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.
[-][Bug] Terminal text's color incorrect with opening quote[/-][+]Theme demo needs to be adjusted so that only unmatched quote is an error[/+]CHANGELOG updates for 3.4.0
Webconfig: Fix quote color also in the theme list