X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fundo.C;h=33b97827325f006009e10dbcc3ef59165aa0c583;hb=52eb91c94fb70d58dceef430659c8781de2eccda;hp=d5d34c0c4a6fbf1c63986375a4f42e82b4abcd41;hpb=55c5fcb30c5de011fd1ebb502e33041eda8179ad;p=lyx.git diff --git a/src/undo.C b/src/undo.C index d5d34c0c4a..33b9782732 100644 --- a/src/undo.C +++ b/src/undo.C @@ -17,18 +17,21 @@ #include "undo.h" #include "buffer.h" +#include "buffer_funcs.h" #include "cursor.h" #include "debug.h" #include "BufferView.h" #include "lyxtext.h" #include "paragraph.h" +#include "ParagraphList.h" -#include "mathed/math_support.h" +#include "mathed/MathSupport.h" #include "insets/inset.h" #include -using lyx::pit_type; + +namespace lyx { using std::advance; using std::endl; @@ -167,6 +170,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=" << to_ascii(undo.array) <(*pit).setInsetOwner(&dit.inset()); + pit->setInsetOwner(dit.realInset()); plist.insert(first, undo.pars.begin(), undo.pars.end()); + updateLabels(*buf); } // Set cursor @@ -250,7 +255,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()); } @@ -287,3 +294,6 @@ void recordUndoFullDocument(BufferView * bv) ); undo_finished = false; } + + +} // namespace lyx