fix cycling through completion suggestions ending in non-word character (#3650)
Some checks failed
Build and Test / test (1.19.x, macos-latest) (push) Has been cancelled
Build and Test / test (1.19.x, ubuntu-latest) (push) Has been cancelled
Build and Test / test (1.19.x, windows-latest) (push) Has been cancelled
Build and Test / test (1.23.x, macos-latest) (push) Has been cancelled
Build and Test / test (1.23.x, ubuntu-latest) (push) Has been cancelled
Build and Test / test (1.23.x, windows-latest) (push) Has been cancelled

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)
}