]> git.lyx.org Git - lyx.git/blobdiff - src/undo.C
revert recent change to development/FORMAT (don't change history)
[lyx.git] / src / undo.C
index 8e5fcc334f9acb23e249bba86f12a1268faf09db..7cf939e43ff443c8e62accf669660d1a12c43047 100644 (file)
@@ -22,6 +22,7 @@
 #include "BufferView.h"
 #include "lyxtext.h"
 #include "paragraph.h"
+#include "ParagraphList.h"
 
 #include "mathed/math_support.h"
 #include "insets/inset.h"
@@ -167,6 +168,7 @@ bool textUndoOrRedo(BufferView & bv,
                // We stored the full cell here as there is not much to be
                // gained by storing just 'a few' paragraphs (most if not
                // all math inset cells have just one paragraph!)
+               //lyxerr << "undo.array=" << undo.array <<endl;
                asArray(undo.array, dit.cell());
        } else {
                // Some finer machinery is needed here.
@@ -250,7 +252,9 @@ void recordUndoInset(LCursor & cur, Undo::undo_kind kind)
 {
        LCursor c = cur;
        c.pop();
-       recordUndo(c, kind);
+       Buffer * buf = cur.bv().buffer();
+       doRecordUndo(kind, c, c.pit(), c.pit(), cur,
+                    buf->params(), false, buf->undostack());
 }