commit dfb2100

Hubert Hirtz  ·  2020-11-13 10:28:51 +0000 UTC
parent 74107f8
Don't autocomplete on empty word
1 files changed,  +3, -0
M app.go
M app.go
+3, -0
 1@@ -463,6 +463,9 @@ func (app *App) completions(cursorIdx int, text []rune) []ui.Completion {
 2 	}
 3 	start++
 4 	word := text[start:cursorIdx]
 5+	if len(word) == 0 {
 6+		return cs
 7+	}
 8 	wordCf := app.s.Casemap(string(word))
 9 	for _, name := range app.s.Names(app.win.CurrentBuffer()) {
10 		if strings.HasPrefix(app.s.Casemap(name.Name.Name), wordCf) {