Auto save on (semi)colon and question/exclamation mark too

This commit is contained in:
M66B 2023-02-11 09:18:40 +01:00
parent 4316b851fb
commit b559ff99ea
2 changed files with 6 additions and 3 deletions

View File

@ -670,7 +670,7 @@ public class FragmentCompose extends FragmentBase {
char b = text.charAt(index - 1);
save = (auto_save_paragraph && c == '\n' && b != '\n') ||
(auto_save_dot && Helper.isDot(c) && !Helper.isDot(b));
(auto_save_dot && Helper.isEndChar(c) && !Helper.isEndChar(b));
if (save)
Log.i("Save=" + index);

View File

@ -2329,8 +2329,11 @@ public class Helper {
};
}
static boolean isDot(char c) {
return (c == '.' /* Latin */ || c == '。' /* Chinese */);
static boolean isEndChar(char c) {
return (c == '.' /* Latin */ ||
c == '。' /* Chinese */ ||
c == ':' || c == ';' ||
c == '?' || c == '!');
}
static String trim(String value, String chars) {