|
|
|
@ -1771,6 +1771,7 @@ public class StyleHelper {
|
|
|
|
|
for (InsertedSpan span : text.getSpans(0, text.length(), InsertedSpan.class))
|
|
|
|
|
text.removeSpan(span);
|
|
|
|
|
if (start >= 0 && start < end && end <= text.length()) {
|
|
|
|
|
if (start == 0) {
|
|
|
|
|
/*
|
|
|
|
|
java.lang.IndexOutOfBoundsException: Invalid Context Range: 0, 1 must be in 0, 0
|
|
|
|
|
at android.graphics.Paint.getRunCharacterAdvance(Paint.java:3541)
|
|
|
|
@ -1797,9 +1798,9 @@ public class StyleHelper {
|
|
|
|
|
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
|
|
|
|
|
at android.os.Handler.handleCallback(Handler.java:959)
|
|
|
|
|
*/
|
|
|
|
|
Pair<Integer, Integer> range = ensureParagraph(text, start, end);
|
|
|
|
|
if (range != null)
|
|
|
|
|
text.setSpan(new InsertedSpan(), range.first, range.second, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
text.setSpan(new InsertedSpan(), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|