]> git.lyx.org Git - lyx.git/blobdiff - src/Undo.cpp
* InsetListings.cpp:
[lyx.git] / src / Undo.cpp
index 6339cad33625aa5af53462b8fc0a54daf5a32dd6..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.
@@ -426,8 +427,9 @@ bool Undo::Private::textUndoOrRedo(DocIterator & cur, bool isUndoOperation)
        while (!stack.empty() && stack.top().group_id == gid)
                doTextUndoOrRedo(cur, stack, otherstack);
 
-       // Addapt the new material to current buffer.
-       buffer_.updateLabels();
+       // Adapt the new material to current buffer.
+       buffer_.setBuffersForInsets(); // FIXME This shouldn't be here.
+       buffer_.updateBuffer();
        return true;
 }