edit: Fix an error not being returned

This commit is contained in:
Cheer Xiao 2013-09-27 20:57:34 +08:00
parent d0694198f6
commit bb9f6e2850

View File

@ -74,7 +74,7 @@ func (rd *reader) readKey() (k Key, err error) {
if e == async.Timeout {
return Key{'[', Alt}, nil
} else if e != nil {
return ZeroKey, nil
return ZeroKey, e
}
// After first rune read we turn off the timeout
rd.timed.Timeout = -1