handle unicode characters in 'push' command

Related #250
This commit is contained in:
Gokcehan 2020-07-20 01:36:22 +03:00
parent 490a4a9d07
commit 6d1a840587

2
ui.go
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 {