1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 01:36:55 +00:00

Delete marked: remove styles first

This commit is contained in:
M66B 2024-05-14 09:59:17 +02:00
parent 1cbebf7870
commit c4442cccf3

View file

@ -350,6 +350,12 @@ public class StyleHelper {
int start = text.getSpanStart(span); int start = text.getSpanStart(span);
int end = text.getSpanEnd(span); int end = text.getSpanEnd(span);
if (end == inserted) { 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.delete(start, end);
text.removeSpan(span); text.removeSpan(span);
} }