forked from mirror/readline
[completer] Fix bug which causes integer divide by zero panicking when input buffer is empty (#54)
* [completer] Fixes issue #53 * Changing check to candidateSource
This commit is contained in:
parent
8fbe9eac1a
commit
dc15d0f641
|
@ -66,7 +66,7 @@ func (o *opCompleter) OnComplete() {
|
|||
buf := o.op.buf
|
||||
rs := buf.Runes()
|
||||
|
||||
if o.IsInCompleteMode() && runes.Equal(rs, o.candidateSource) {
|
||||
if o.IsInCompleteMode() && o.candidateSource != nil && runes.Equal(rs, o.candidateSource) {
|
||||
o.EnterCompleteSelectMode()
|
||||
o.doSelect()
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue