Skip to content

Commit

Permalink
reader nil check in escapeExKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Pristáš Michal authored and Pristáš Michal committed Oct 26, 2015
1 parent 30303e5 commit bcc2f07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit bcc2f07

Please sign in to comment.