From 30303e5637907d7695d02a13e9480937514d1247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Prist=C3=A1=C5=A1=20Michal?= Date: Mon, 26 Oct 2015 09:43:34 +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 ba99a9b..4691c52 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 d, _, err := reader.ReadRune(); err != nil || d != 126 { + if reader != nil && d, _, err := reader.ReadRune(); err != nil || d != 126 { reader.UnreadRune() } case 'D':