Follow-up from #74 / PR #927, which solved merge propagation for drag-move
(moveRangeTo) and explicitly deferred the same problem for paste.
Sheet.paste (packages/sheets/src/model/worksheet/sheet.ts) references merges
only via expandChangedSrefsWithMergeAliases, for recalculation. It neither
carries a copied merged block's layout to the paste destination nor validates
that the paste target would split an existing merge, so pasting over merged
cells writes content into covered cells that stay hidden under the merge — and
resurfaces as stale data on unmerge, which is the exact class #927 fixed for
drag-move.
The same propagate-or-reject decision applies, and the machinery already
exists: getMergesIntersecting, mergeCoveredSrefs, rebuildMergeCoverMap,
plus the covered-cell clearing and changedSrefs invalidation that #927 added.
Follow-up from #74 / PR #927, which solved merge propagation for drag-move
(
moveRangeTo) and explicitly deferred the same problem for paste.Sheet.paste(packages/sheets/src/model/worksheet/sheet.ts) references mergesonly via
expandChangedSrefsWithMergeAliases, for recalculation. It neithercarries a copied merged block's layout to the paste destination nor validates
that the paste target would split an existing merge, so pasting over merged
cells writes content into covered cells that stay hidden under the merge — and
resurfaces as stale data on unmerge, which is the exact class #927 fixed for
drag-move.
The same propagate-or-reject decision applies, and the machinery already
exists:
getMergesIntersecting,mergeCoveredSrefs,rebuildMergeCoverMap,plus the covered-cell clearing and
changedSrefsinvalidation that #927 added.