In AttributedString::set_text_color and AttributedString::set_font, range.end is used as the length field to CFRange::init, which unless I am mistaken seems wrong to me.
The documentation implies that if I set the set range 3..4 to red, I would change only character 3 to be red, not 3 through 6, which is what currently happens.
In
AttributedString::set_text_color
andAttributedString::set_font
,range.end
is used as thelength
field toCFRange::init
, which unless I am mistaken seems wrong to me.The documentation implies that if I set the set range
3..4
to red, I would change only character 3 to be red, not 3 through 6, which is what currently happens.The relevant code is here: https://github.com/ryanmcgrath/cacao/blob/7ffe39891cd73984c4bea5e37d463f3398361320/src/text/attributed_string.rs#L45-L58