reader nil check in escapeExKey

This commit is contained in:
Pristáš Michal 2015-10-26 09:45:11 +01:00
parent 30303e5637
commit bcc2f0762c
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ func escapeExKey(r rune, reader *bufio.Reader) rune {
switch r { switch r {
case 51: case 51:
r = CharDelete r = CharDelete
if reader != nil && d, _, err := reader.ReadRune(); err != nil || d != 126 { if d, _, err := reader.ReadRune(); reader != nil && (err != nil || d != 126) {
reader.UnreadRune() reader.UnreadRune()
} }
case 'D': case 'D':