Paragraph::Remove() Keep last remaining span as empty span.
This commit is contained in:
parent
819824e020
commit
f429142df9
|
@ -203,9 +203,10 @@ Paragraph::Remove(int32 offset, int32 length)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if anything from the TextSpan at offset remained
|
// See if anything from the TextSpan at offset remained, keep it as empty
|
||||||
|
// span if it is the last remaining span.
|
||||||
index--;
|
index--;
|
||||||
if (span.CountChars() > 0) {
|
if (span.CountChars() > 0 || fTextSpans.CountItems() == 1) {
|
||||||
fTextSpans.Replace(index, span);
|
fTextSpans.Replace(index, span);
|
||||||
} else {
|
} else {
|
||||||
fTextSpans.Remove(index);
|
fTextSpans.Remove(index);
|
||||||
|
|
Loading…
Reference in New Issue