]> git.lyx.org Git - features.git/blobdiff - src/Undo.cpp
brkstr2str_pos: avoid case where length is negative
[features.git] / src / Undo.cpp
index 670449035202e480137b3d7f77a882b0ae4d3c00..a870241d13b2475df8d9b25d18d07bce8c1ec15d 100644 (file)
 #include "ParagraphList.h"
 #include "Text.h"
 
+#include "mathed/InsetMath.h"
 #include "mathed/MathData.h"
+#include "mathed/MathRow.h"
 
-#include "insets/Inset.h"
 #include "insets/InsetText.h"
 
 #include "support/debug.h"
@@ -449,11 +450,8 @@ void Undo::Private::doUndoRedoAction(CursorData & cur, UndoElementStack & stack,
                otherstack.top().bparams = new BufferParams(buffer_.params());
                DocumentClassConstPtr olddc = buffer_.params().documentClassPtr();
                buffer_.params() = *undo.bparams;
-               // The error list is not supposed to be helpful here.
-               ErrorList el;
                cap::switchBetweenClasses(olddc, buffer_.params().documentClassPtr(),
-                       static_cast<InsetText &>(buffer_.inset()), el);
-               LATTEST(el.empty());
+                       static_cast<InsetText &>(buffer_.inset()));
        } else if (dit.inMathed()) {
                // We stored the full cell here as there is not much to be
                // gained by storing just 'a few' paragraphs (most if not