mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-26 06:46:35 +00:00
Fix #185 - Terminate on RuneError
This commit is contained in:
parent
3a9d1df026
commit
2d68cb8639
@ -7,6 +7,7 @@ CHANGELOG
|
|||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
- Fixed Unicode case handling (#186)
|
- Fixed Unicode case handling (#186)
|
||||||
|
- Fixed to terminate on RuneError (#185)
|
||||||
|
|
||||||
0.9.7
|
0.9.7
|
||||||
-----
|
-----
|
||||||
|
@ -420,6 +420,9 @@ func GetChar() Event {
|
|||||||
return Event{int(_buf[0]), 0, nil}
|
return Event{int(_buf[0]), 0, nil}
|
||||||
}
|
}
|
||||||
r, rsz := utf8.DecodeRune(_buf)
|
r, rsz := utf8.DecodeRune(_buf)
|
||||||
|
if r == utf8.RuneError {
|
||||||
|
return Event{ESC, 0, nil}
|
||||||
|
}
|
||||||
sz = rsz
|
sz = rsz
|
||||||
return Event{Rune, r, nil}
|
return Event{Rune, r, nil}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user