Merge 33748ac28d336190012302877d94540b61d4d7d6 into 82a912274504477990ecf7c852eebb7c85291772

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

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

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