mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 17:27:00 +00:00
Delete marked: remove styles first
This commit is contained in:
parent
1cbebf7870
commit
c4442cccf3
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue