]> git.lyx.org Git - lyx.git/blobdiff - src/Undo.cpp
Rename InsetOptArg as InsetArgument.
[lyx.git] / src / Undo.cpp
index 388d009b56d3e6477c9b406226c09274033b4576..32ba4f2864de23bcc1b231460882efc1cb8206ad 100644 (file)
@@ -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;
 }