X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FUndo.cpp;h=32ba4f2864de23bcc1b231460882efc1cb8206ad;hb=8480d1dd9af6f3d403ea42e2b891d38dd3ce2509;hp=388d009b56d3e6477c9b406226c09274033b4576;hpb=3aecc2c4fff1dc1408a34f61b6a6a7a028a55efc;p=lyx.git diff --git a/src/Undo.cpp b/src/Undo.cpp index 388d009b56..32ba4f2864 100644 --- a/src/Undo.cpp +++ b/src/Undo.cpp @@ -296,7 +296,8 @@ void Undo::Private::doRecordUndo(UndoKind kind, // 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. @@ -427,7 +428,8 @@ bool Undo::Private::textUndoOrRedo(DocIterator & cur, bool isUndoOperation) 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; }