// fill in the real data to be saved
if (cell.inMathed()) {
// simply use the whole cell
- undo.array = new MathData(cell.cell());
+ MathData & ar = cell.cell();
+ undo.array = new MathData(ar.buffer(), ar.begin(), ar.end());
} else {
// some more effort needed here as 'the whole cell' of the
// main Text _is_ the whole document.
doTextUndoOrRedo(cur, stack, otherstack);
// Adapt the new material to current buffer.
- buffer_.updateLabels();
+ buffer_.setBuffersForInsets(); // FIXME This shouldn't be here.
+ buffer_.updateBuffer();
return true;
}