]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSymbol.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathSymbol.cpp
index 28119d2a9ba6f05ef992e5ae02b38b4290bac2c7..b152388ee075d963299100fdc8ba5d3613ed0a04 100644 (file)
@@ -206,15 +206,8 @@ void InsetMathSymbol::octave(OctaveStream & os) const
 
 void InsetMathSymbol::write(WriteStream & os) const
 {
-       bool brace = os.pendingBrace();
-       os.pendingBrace(false);
-       if (os.latex() && os.textMode()) {
-               os << "\\ensuremath{";
-               os.textMode(false);
-               brace = true;
-       }
+       MathEnsurer ensurer(os);
        os << '\\' << name();
-       os.pendingBrace(brace);
 
        // $,#, etc. In theory the restriction based on catcodes, but then
        // we do not handle catcodes very well, let alone cat code changes,