LanguageTool fixes

This commit is contained in:
M66B 2022-11-13 10:46:35 +01:00
parent 8bdbd52fef
commit b2d2c78b4b
1 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ public class LanguageTool {
Suggestion suggestion = new Suggestion();
suggestion.title = jmatch.getString("shortMessage");
suggestion.description = jmatch.getString("message");
suggestion.offset = jmatch.getInt("offset");
suggestion.offset = jmatch.getInt("offset") + start;
suggestion.length = jmatch.getInt("length");
JSONArray jreplacements = jmatch.getJSONArray("replacements");
@ -380,7 +380,7 @@ public class LanguageTool {
Log.w("LT " + s + "..." + e + " length=" + edit.length());
continue;
}
edit.setSpan(span, s, e, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
edit.setSpan(span, s, e, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING);
}
}