]> git.lyx.org Git - features.git/commitdiff
* undo.C (recordUndoInset): remember the cursor position inside
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 17 Aug 2006 20:13:30 +0000 (20:13 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 17 Aug 2006 20:13:30 +0000 (20:13 +0000)
the inset.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14791 a592a061-630c-0410-9148-cb99ea01b6c8

src/undo.C

index 536a2e4d5c161c6f8b43ab129ee84bc819e35134..7cf939e43ff443c8e62accf669660d1a12c43047 100644 (file)
@@ -168,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.
@@ -251,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());
 }