]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSpace.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathSpace.cpp
index 60950c30ad3e99657ebe0ac162b6e75dd3cbd3f1..b9286087cf26599187d568adf3b50a72906f3dd5 100644 (file)
@@ -147,16 +147,9 @@ void InsetMathSpace::normalize(NormalStream & os) const
 void InsetMathSpace::write(WriteStream & os) const
 {
        if (space_ >= 0 && space_ < nSpace) {
-               bool brace = os.pendingBrace();
-               os.pendingBrace(false);
-               if (os.latex() && os.textMode()) {
-                       os << "\\ensuremath{";
-                       os.textMode(false);
-                       brace = true;
-               }
+               MathEnsurer ensurer(os);
                os << '\\' << latex_mathspace[space_];
                os.pendingSpace(true);
-               os.pendingBrace(brace);
        }
 }