mirror of https://github.com/chzyer/readline.git
reader nil check in escapeExKey
This commit is contained in:
parent
30303e5637
commit
bcc2f0762c
2
utils.go
2
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':
|
||||
|
|
Loading…
Reference in New Issue