mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-23 00:13:49 -07:00
Fix #185 - Terminate on RuneError
This commit is contained in:
@@ -420,6 +420,9 @@ func GetChar() Event {
|
||||
return Event{int(_buf[0]), 0, nil}
|
||||
}
|
||||
r, rsz := utf8.DecodeRune(_buf)
|
||||
if r == utf8.RuneError {
|
||||
return Event{ESC, 0, nil}
|
||||
}
|
||||
sz = rsz
|
||||
return Event{Rune, r, nil}
|
||||
}
|
||||
|
Reference in New Issue
Block a user