pull/213/head
M66B 12 months ago
parent 171aa6a370
commit d71be68c77

@ -739,11 +739,12 @@ public class FragmentCompose extends FragmentBase {
if (save != null)
try {
if (lt == null && lt_sentence) {
if (lt == null && lt_sentence &&
Helper.isSentenceChar(text.charAt(save))) {
int start = save;
while (start > 0 &&
text.charAt(start - 1) != '\n' &&
!Helper.isEndChar(text.charAt(start - 1)))
!Helper.isSentenceChar(text.charAt(start - 1)))
start--;
while (start < save)
if (Character.isWhitespace(text.charAt(start)))

@ -2528,10 +2528,13 @@ public class Helper {
}
static boolean isEndChar(char c) {
return (isSentenceChar(c) ||
c == ',' || c == ':' || c == ';');
}
static boolean isSentenceChar(char c) {
return (c == '.' /* Latin */ ||
c == '。' /* Chinese */ ||
c == ',' ||
c == ':' || c == ';' ||
c == '?' || c == '!');
}

Loading…
Cancel
Save