Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix: cutting to the target range does not require filtering merge cells of the same size (#3976)

ybzkya2c292efed4e
diff --git a/packages/sheets-ui/src/controllers/clipboard/utils.ts b/packages/sheets-ui/src/controllers/clipboard/utils.ts
index 93c5acaef4..c7cc78b748 100644
--- a/packages/sheets-ui/src/controllers/clipboard/utils.ts
+++ b/packages/sheets-ui/src/controllers/clipboard/utils.ts
@@ -184,9 +184,7 @@ export function getMoveRangeMutations(
.map((mergeRange) => Rectangle.getRelativeRange(mergeRange, fromRange))
.map((relativeRange) => Rectangle.getPositionRange(relativeRange, toRange));
- const addMergeCellRanges = getAddMergeMutationRangeByType(willMoveToMergeRanges).filter(
- (range) => !toMergeData.some((mergeRange) => Rectangle.equals(range, mergeRange))
- );
+ const addMergeCellRanges = getAddMergeMutationRangeByType(willMoveToMergeRanges);
const mergeRedos: Array<{
id: string;