@natecook1000 @rauhul I think this is an urgent fix that should be merged before any new version is released.
I will make a PR now.
Replace the cursor index within completing word parameter of custom-completion closures with a String completionPrefix parameter.
Most of the time, a completion function will just want the prefix of the word being completed before the cursor.
Code shouldn't have to be complex to get it, but I didn't realize how cumbersome Int indices are for Swift Strings (I'm fairly new to Swift).
Code can easily get the index from the prefix. This should be a much nicer experience for users.
@natecook1000 @rauhul I think this is an urgent fix that should be merged before any new version is released.
I will make a PR now.
Replace the cursor index within completing word parameter of custom-completion closures with a
StringcompletionPrefixparameter.Most of the time, a completion function will just want the prefix of the word being completed before the cursor.
Code shouldn't have to be complex to get it, but I didn't realize how cumbersome
Intindices are for SwiftStrings (I'm fairly new to Swift).Code can easily get the index from the prefix. This should be a much nicer experience for users.