compose: don't call ti.tabcomplete when it is nil

This commit is contained in:
Timmy Douglas 2020-01-08 20:38:56 -08:00 committed by Drew DeVault
parent a40959c129
commit eca3863242
1 changed files with 4 additions and 0 deletions

View File

@ -275,6 +275,10 @@ func (ti *TextInput) updateCompletions() {
} }
func (ti *TextInput) showCompletions() { func (ti *TextInput) showCompletions() {
if ti.tabcomplete == nil {
// no completer
return
}
ti.completions = ti.tabcomplete(ti.StringLeft()) ti.completions = ti.tabcomplete(ti.StringLeft())
ti.completeIndex = -1 ti.completeIndex = -1
ti.Invalidate() ti.Invalidate()