fix cycling through completion suggestions ending in non-word character (#3650)

This commit is contained in:
Mikko 2025-04-15 22:02:41 +03:00 committed by GitHub
parent b88300ef7f
commit 79fe4ae3e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -911,6 +911,11 @@ func (h *BufPane) Autocomplete() bool {
return false
}
if b.HasSuggestions {
b.CycleAutocomplete(true)
return true
}
if h.Cursor.X == 0 {
return false
}
@ -921,10 +926,6 @@ func (h *BufPane) Autocomplete() bool {
return false
}
if b.HasSuggestions {
b.CycleAutocomplete(true)
return true
}
return b.Autocomplete(buffer.BufferComplete)
}