Skip to content

Commit

Permalink
change condition to check word with apostrophe correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Sesow29 committed Apr 28, 2024
1 parent 6b569de commit f38bd5d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import android.view.textservice.SuggestionsInfo;
import android.view.textservice.TextInfo;

import helium314.keyboard.latin.common.Constants;
import helium314.keyboard.latin.common.StringUtils;
import helium314.keyboard.latin.settings.Settings;
import helium314.keyboard.latin.settings.SpacingAndPunctuations;
Expand Down Expand Up @@ -79,7 +80,7 @@ public int getEndOfWord(final CharSequence sequence, final int fromIndex) {
}
while (index < length) {
final int codePoint = Character.codePointAt(sequence, index);
if (mSpacingAndPunctuations.isWordSeparator(codePoint) || mSpacingAndPunctuations.isWordConnector(codePoint)) {
if (mSpacingAndPunctuations.isWordSeparator(codePoint) || codePoint == Constants.CODE_DASH) {
return index;
}
index += Character.charCount(codePoint);
Expand Down

0 comments on commit f38bd5d

Please sign in to comment.