Closed hymkor closed 3 years ago
Thank you. Please take me a little time to understand what this fixes.
Is this correctly on Linux?
For Linux, I have not modified any codes for Linux-dependent and OS-independent part because I considered the codes for Linux do not call ReadConsoleInput directly.
As far as I experimented on WSL-1 of Windows10 now, go-tty looks to work finely when ∞Ⓓ
are pasted whether my patch is included or not on Linux .
Thank you
Thank you for merging. When I know the reason for the behavior of ReadConsoleInput , I would report it or send a better code.
I found some characters between U+2000 and U+2FFF which can not be gotten by ReadRune in Windows. For example,
∞
andⒹ
.We can see the problem as below. (I did on Windows10)
∞Ⓓ
to the clipboard on the web browser.go run _example/readline.go
( See also https://github.com/zetamatta/nyagos/issues/390 . And https://github.com/judah/haskeline/issues/54 may be the similar problem )
I made the test program and saw the strange data from ReadConsoleInput.
I do not understand the reason that those input are given from ReadConsoleInput. But, I want to fix the problem, so I made the patch for a workaround. ( A better solution may be exist, but I could not find it.)
Would you merge this patch if problems do not exist , @mattn ?