This commit is contained in:
Sam Xie 2021-03-06 02:19:18 +05:30 committed by GitHub
commit f69840c492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -188,3 +188,9 @@ func NewCompletionManager(completer Completer, max uint16) *CompletionManager {
verticalScroll: 0,
}
}
var _ Completer = NoopCompleter
func NoopCompleter(_ Document) []Suggest {
return nil
}

View File

@ -204,3 +204,9 @@ func TestFormatText(t *testing.T) {
}
}
}
func TestNoopCompleter(t *testing.T) {
if NoopCompleter(Document{}) != nil {
t.Errorf("NoopCompleter should return nil")
}
}