mirror of https://github.com/M66B/FairEmail.git
Added fail-safe
This commit is contained in:
parent
83cb57b006
commit
ce5499e91f
|
@ -959,7 +959,8 @@ public class StyleHelper {
|
|||
static void markAsInserted(Editable text, int start, int end) {
|
||||
for (InsertedSpan span : text.getSpans(0, text.length(), InsertedSpan.class))
|
||||
text.removeSpan(span);
|
||||
text.setSpan(new InsertedSpan(), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
if (start >= 0 && start < end && end <= text.length())
|
||||
text.setSpan(new InsertedSpan(), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
|
||||
static class InsertedSpan implements NoCopySpan {
|
||||
|
|
Loading…
Reference in New Issue