Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor position is wrong with special characters #815

Open
tgross35 opened this issue Jun 18, 2022 · 4 comments
Open

Cursor position is wrong with special characters #815

tgross35 opened this issue Jun 18, 2022 · 4 comments
Labels
bug The playground isn't doing what it was intended to help wanted Not immediately going to be prioritized — ask for mentoring instructions! upstream Caused by a third-party component

Comments

@tgross35
Copy link
Contributor

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

@shepmaster
Copy link
Member

shepmaster commented Jun 20, 2022

Which editor?

2A87E944-D4A6-4CE4-9292-051769D5DEA1

Which operating system?

Assuming you are using Ace, can you reproduce it on https://ace.c9.io/build/kitchen-sink.html

@tgross35
Copy link
Contributor Author

@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 in. It displays correctly but seems like cursor position / editing is char-based rather than grapheme-based

@shepmaster shepmaster added bug The playground isn't doing what it was intended to help wanted Not immediately going to be prioritized — ask for mentoring instructions! upstream Caused by a third-party component labels Jun 20, 2022
@shepmaster
Copy link
Member

shepmaster commented Jun 20, 2022

You'll need to file the issue with Ace, please. Feel free to link to the Ace issue from here once opened.

@tgross35
Copy link
Contributor Author

Thanks for the link, looks like here is the tracked issue ajaxorg/ace#4142

Please close or leave open as you see fit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The playground isn't doing what it was intended to help wanted Not immediately going to be prioritized — ask for mentoring instructions! upstream Caused by a third-party component
Projects
None yet
Development

No branches or pull requests

2 participants