Delete marked: remove styles first

This commit is contained in:
M66B 2024-05-14 09:59:17 +02:00
parent 1cbebf7870
commit c4442cccf3
1 changed files with 6 additions and 0 deletions

View File

@ -350,6 +350,12 @@ public class StyleHelper {
int start = text.getSpanStart(span);
int end = text.getSpanEnd(span);
if (end == inserted) {
for (Object o : text.getSpans(start, end, Object.class)) {
int s = text.getSpanStart(o);
int e = text.getSpanEnd(o);
if (s <= e && s >= start && e <= end)
text.removeSpan(o);
}
text.delete(start, end);
text.removeSpan(span);
}