Closed MrCasCode closed 2 years ago
Hi @sayanarijit
Thank you very much for this amazing crate.
I'm encountering a systematic crash whenever I write strings containing unicode characters.
It's crashing on input.rs: 115: self.value.remove(self.cursor);
input.rs: 115: self.value.remove(self.cursor);
A minimum reproducible example is:
let mut string = "¡¡¡¡".to_string(); string.remove(1);
thread 'main' panicked at 'byte index 1 is not a char boundary; it is inside '¡' (bytes 0..2) of¡¡¡¡'
thread 'main' panicked at 'byte index 1 is not a char boundary; it is inside '¡' (bytes 0..2) of
'
For now just creating the issue to signal the weakness. I'll create a PR if I find a clean solution
Thanks for reporting. Released 0.2.0 with the fix. EDIT: 0.2.1 fixes insertion as well.
Hi @sayanarijit
Thank you very much for this amazing crate.
I'm encountering a systematic crash whenever I write strings containing unicode characters.
It's crashing on
input.rs: 115: self.value.remove(self.cursor);
A minimum reproducible example is:
thread 'main' panicked at 'byte index 1 is not a char boundary; it is inside '¡' (bytes 0..2) of
¡¡¡¡'
For now just creating the issue to signal the weakness. I'll create a PR if I find a clean solution