rust-playground
rust-playground copied to clipboard
Cursor position is wrong with special characters
Hello all,
I haven't been able to find this written up anywhere, so here's the issue. Special characters cause the position to offset, probably due to the Unicode helpers. See the example here:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b7401426cca8ddcc8a53cc025adb6b4c
Place your cursor somewhere after the fancy a and type, you'll be typing one letter behind what you expect
Which editor?

Which operating system?
Assuming you are using Ace, can you reproduce it on https://ace.c9.io/build/kitchen-sink.html
@shepmaster you are correct, it's only on ace, noticed both on MacOS and Windows. Guess it's an easy fix to switch.
It is reproducable on that playground - just paste the a̐ in. It displays correctly but seems like cursor position / editing is char-based rather than grapheme-based
You'll need to file the issue with Ace, please. Feel free to link to the Ace issue from here once opened.
Thanks for the link, looks like here is the tracked issue https://github.com/ajaxorg/ace/issues/4142
Please close or leave open as you see fit