Fix: some emoji could not be gotten in WindowsTerminal 1.5 #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After WindowsTerminal is updated to version 1.5, some emojis ( e.g.: 👨U+1F468) can not be gotten by ReadRune() like unicodes between U+2000 and U+2FFF , when they are pasted by mouse's right button.
So, I tried to fix it like #38 , but to prevent from the failure like #40 , I appended the code to check whether NUMPAD(s) are pressed or not, because when the unicode is pasted , the sequence: (1) ALT-Presse, (2) some NUMPAD(s)-Pressed/Released and (3) ALT-Released are received from ReadConsoleInput.
You can confirm by these process.
go run _example/simple.go
on the WindowsTerminal.0xD83D: �
(0xD83D is the first UTF16 code of the surrogate pair)If problems do not exist, would you please merge it , @mattn ?