forked from mirror/readline
reader nil check in escapeExKey
This commit is contained in:
parent
391c225c0b
commit
30303e5637
2
utils.go
2
utils.go
|
@ -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 d, _, err := reader.ReadRune(); err != nil || d != 126 {
|
if reader != nil && d, _, err := reader.ReadRune(); err != nil || d != 126 {
|
||||||
reader.UnreadRune()
|
reader.UnreadRune()
|
||||||
}
|
}
|
||||||
case 'D':
|
case 'D':
|
||||||
|
|
Loading…
Reference in New Issue