wjlroe / bim

A text editor in Rust, very experimental [mirror of gitlab repo]
https://gitlab.com/wjlroe/bim
GNU General Public License v3.0
5 stars 0 forks source link

Unbreak syntax highlighting with 2-byte wide characters #22

Closed wjlroe closed 6 years ago

wjlroe commented 6 years ago

We were slicing into the string using char enumeration as an index, rather that using the safe char_indices() method to get byte indices into the string. This change required separating out the index into chars from the index into the hl vector.