Fix key repeat escape code truncation issue

This commit is contained in:
Timothy Warren 2019-09-04 13:25:48 -04:00
parent 11a058c8df
commit 13eb9fd7b4
1 changed files with 2 additions and 1 deletions

View File

@ -183,7 +183,8 @@ impl Editor {
// Match escape sequence
// --------------------------------------------------------------------
let mut seq = [0; 4];
match br.read_exact(&mut seq) {
let mut seq_handle = br.take(4);
match seq_handle.read(&mut seq) {
Ok(_) => (),
Err(e) => {
if e.kind() != io::ErrorKind::UnexpectedEof {