1
0
Fork 0

disabled word recomposition when the cursor is in the middle of a word

This commit is contained in:
sspanak 2025-06-10 15:21:28 +03:00 committed by Dimo Karaivanov
parent 8284655605
commit a5f5e8c1d9

View file

@ -127,6 +127,11 @@ class ModeWords extends ModeCheonjiin {
return null;
}
String after = textField.getStringAfterCursor(1);
if (!after.isEmpty() && !Character.isWhitespace(after.codePointAt(0))) {
return null;
}
boolean includeApostrophes = LanguageKind.isUkrainian(language) || LanguageKind.isHebrew(language);
String previousWord = textField.getTextBeforeCursor().getPreviousWord(false, includeApostrophes);
if (previousWord.length() < 2 || previousWord.contains(" ")) {