Skip to content

Commit b483b61

Browse files
committed
Check for span range included in changed chars
1 parent 7e3790f commit b483b61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/formatting/InlineFormatter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class InlineFormatter(editor: AztecText, val codeStyle: CodeStyle, val headerSty
6868
val spanStart = editableText.getSpanStart(it)
6969
val spanEnd = editableText.getSpanEnd(it)
7070

71-
if ((spanStart == start || spanEnd == count + start) && spanEnd < after) {
71+
if ((spanStart == start || spanEnd == count + start) && (spanEnd - spanStart) < after) {
7272
editableText.removeSpan(it)
7373
carryOverSpans.add(CarryOverSpan(it, spanStart, spanEnd))
7474
}

0 commit comments

Comments
 (0)