MCPcopy
hub / github.com/micro-editor/micro / Autocomplete

Method Autocomplete

internal/buffer/autocomplete.go:27–35  ·  view source on GitHub ↗

Autocomplete starts the autocomplete process

(c Completer)

Source from the content-addressed store, hash-verified

25
26// Autocomplete starts the autocomplete process
27func (b *Buffer) Autocomplete(c Completer) bool {
28 b.Completions, b.Suggestions = c(b)
29 if len(b.Completions) != len(b.Suggestions) || len(b.Completions) == 0 {
30 return false
31 }
32 b.CurSuggestion = -1
33 b.CycleAutocomplete(true)
34 return true
35}
36
37// CycleAutocomplete moves to the next suggestion
38func (b *Buffer) CycleAutocomplete(forward bool) {

Callers

nothing calls this directly

Calls 1

CycleAutocompleteMethod · 0.95

Tested by

no test coverage detected