commit a2cdd74
delthas
·
2024-07-03 15:03:13 +0000 UTC
parent 06d3d2c
Autocomplete immediately when only one result is found Fixes: https://todo.sr.ht/~delthas/senpai/142
1 files changed,
+3,
-1
+3,
-1
1@@ -444,7 +444,9 @@ func (e *Editor) AutoComplete() (ok bool) {
2 return false
3 }
4 e.autoCacheIdx = 0
5- return
6+ if len(e.autoCache) > 1 {
7+ return false
8+ }
9 }
10
11 e.text[e.lineIdx].runes = e.autoCache[e.autoCacheIdx].Text