handle unicode characters in 'push' command

Related #250
This commit is contained in:
Gokcehan committed 2020-07-20 01:36:22 +03:00
1 parent 490a4a9d07
commit 6d1a840587
1 file changed
+1 -1
+1 -1
View File
@@ -816,7 +816,7 @@ func (ui *ui) pollEvent() termbox.Event {
case key := <-ui.keyChan:
ev := termbox.Event{Type: termbox.EventKey}
if len(key) == 1 {
if utf8.RuneCountInString(key) == 1 {
ev.Ch, _ = utf8.DecodeRuneInString(key)
} else {
switch {