]> git.lyx.org Git - lyx.git/blobdiff - src/Undo.cpp
Partially revert r34995, which broke math output. Not sure why yet....
[lyx.git] / src / Undo.cpp
index fa07291ac6dce4cb7426e4290d86ed5827877901..e130cd8fdc61d32a6a15112aa6340bd0fadf805a 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.
@@ -428,7 +429,6 @@ bool Undo::Private::textUndoOrRedo(DocIterator & cur, bool isUndoOperation)
 
        // Adapt the new material to current buffer.
        buffer_.setBuffersForInsets(); // FIXME This shouldn't be here.
-       buffer_.updateBuffer();
        return true;
 }