]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNest.cpp
Revert "Fix a number of signedness warnings"
[lyx.git] / src / mathed / InsetMathNest.cpp
index 06d1c12e56decab243ebb92b48c7972dbc834a8f..ada0400f18f51045eff592b219a648477c3d8820 100644 (file)
@@ -30,7 +30,6 @@
 #include "InsetMathUnknown.h"
 #include "MathAutoCorrect.h"
 #include "MathCompletionList.h"
-#include "MathData.h"
 #include "MathFactory.h"
 #include "InsetMathMacro.h"
 #include "InsetMathMacroArgument.h"
@@ -330,6 +329,7 @@ void InsetMathNest::write(WriteStream & os) const
        ModeSpecifier specifier(os, currentMode(), lockedMode());
        docstring const latex_name = name();
        os << '\\' << latex_name;
+       os.inMathClass(asClassInset());
        for (size_t i = 0; i < nargs(); ++i) {
                Changer dummy = os.changeRowEntry(TexRow::mathEntry(id(),i));
                os << '{' << cell(i) << '}';
@@ -340,6 +340,7 @@ void InsetMathNest::write(WriteStream & os) const
                os << "\\lyxlock";
                os.pendingSpace(true);
        }
+       os.inMathClass(false);
 }
 
 
@@ -2025,7 +2026,7 @@ CompletionList const *
 InsetMathNest::createCompletionList(Cursor const & cur) const
 {
        if (!cur.inMacroMode())
-               return 0;
+               return nullptr;
 
        return new MathCompletionList(cur);
 }