Replaced IsNonAlphaNumeric() with IsNonWordChar()

This commit is contained in:
Massimo Mund
2024-05-14 08:51:13 +02:00
parent 1f51d0b9e2
commit 889a841575
3 changed files with 16 additions and 14 deletions

View File

@@ -745,8 +745,8 @@ func (h *BufPane) Autocomplete() bool {
}
r := h.Cursor.RuneUnder(h.Cursor.X)
prev := h.Cursor.RuneUnder(h.Cursor.X - 1)
if !util.IsAutocomplete(prev) || !util.IsNonAlphaNumeric(r) {
// don't autocomplete if cursor is on alpha numeric character (middle of a word)
if !util.IsAutocomplete(prev) || util.IsWordChar(r) {
// don't autocomplete if cursor is within a word
return false
}