Avoid copying attribute map when deleting

Calling cleanupFormattingGap should not make a copy of the
attributes because it needs to be able to update them.
This commit is contained in:
Jeremy Nicholl
2022-01-31 14:49:16 -05:00
parent 99326f67b8
commit 164b38f0cd
2 changed files with 23 additions and 1 deletions

View File

@@ -465,7 +465,7 @@ const deleteText = (transaction, currPos, length) => {
currPos.forward()
}
if (start) {
cleanupFormattingGap(transaction, start, currPos.right, startAttrs, map.copy(currPos.currentAttributes))
cleanupFormattingGap(transaction, start, currPos.right, startAttrs, currPos.currentAttributes)
}
const parent = /** @type {AbstractType<any>} */ (/** @type {Item} */ (currPos.left || currPos.right).parent)
if (parent._searchMarker) {