-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Surrogate pairs (emojis, etc.) are not handled well in insert mode #6046
Comments
I have the same issue. Would you mind taking a look @J-Fields , thanks. |
Can you confirm this is still an issue? This implementation was changed a bit in 1.19.0 |
Thank you for letting me know! 🤝 I've checked with 1.19.2, but I still see the same issue, unfortunately. |
Hello. I still have same issue too. However, I found that I can get around this problem by using :emojisense: . Please refer to it. Environment:
Thank you. |
Yeah, I know that extension exists. Moreover, VS Code itself has built-in support for emoji input ( But, this issue is not only about emoji, but also about any other characters that are represented as surrogate pairs, so it still needs to be resolved, even then. |
This also happens to me when I try to insert emoji using |
Spend an hour on this issue, finally realized it's vscodevim's issue for not having emojis properly displayed. |
Wow, I've confirmed that the latest release resolves the issue. Excellent! 🎉 🎉 |
Hi, according to above, this was fixed, but I am experiencing this problem now on Mac, vscodevim version 1.24.3, VSCode version: 1.68.1 ... in insert mode, if I try to trigger the emoji insertion dialog (Ctrl + Cmd + Space), nothing happens. I can trigger it in another app, and then paste into insert mode in vscode vim, but can't seen to trigger it in vscode itself now. 😥 PS -- this is very cool extension, thanks for making this. Now I can improve my vim skills while using VSCode, haha 😁 |
Description
When I'm typing in a text containing surrogate pairs (like emoji, relatively complicated kanji, etc.) using my input method in the insert mode, the text gets garbled as shown in the GIF below:
After digging into the codebase, I found that this line of code does not seem to handle surrogate pairs well:
This can be confirmed as follows:
To fix this behavior, I think we need to do something like what VSCode does in getPrevCodePoint. If we had it, we should be able to handle text containing surrogate pairs well like the following:
To Reproduce
Typing in a text containing surrogate pairs in the insert mode.
Expected behavior
Expected characters are successfully entered in the editor.
Environment:
The text was updated successfully, but these errors were encountered: