zed icon indicating copy to clipboard operation
zed copied to clipboard

(GPUI issue) Zed crashes when encountering a color containing different chars with the same symbol in a theme

Open a-usr opened this issue 1 year ago • 0 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Say you have a color code #fаfаfa and the a's in this color color are for one part the latin character a and for the other the cyrillic character а, which has a different unicode codepoint. If you passed this color code inside of a theme to zed, the function crates/gpui/src/color.rs::[impl TryFrom<&'_ str> for Rgba]::try_from(value: &'_ str) would create a very confusing panic: byte index 2 is not a char boundary; it is inside 'а' (bytes 1..3) of fаfаfa

Please see this other issue for Reference: #11997

Environment

Platform-independend

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

a-usr avatar May 21 '24 11:05 a-usr