From bcc2f0762c3f12a3a529470063a4b863633d5d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Prist=C3=A1=C5=A1=20Michal?= Date: Mon, 26 Oct 2015 09:45:11 +0100 Subject: [PATCH] reader nil check in escapeExKey --- utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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':