diff --git a/utils.go b/utils.go index 4691c52..efadd41 100644 --- a/utils.go +++ b/utils.go @@ -43,7 +43,7 @@ func escapeExKey(r rune, reader *bufio.Reader) rune { switch r { case 51: 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() } case 'D':