]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathMacro.cpp
nullptr
[lyx.git] / src / mathed / InsetMathMacro.cpp
index a21460091fda3e6cbe0f2a9d0000c3b7cff82d5d..d2c35c7e5bea913e1d857fc319871945de87d0db 100644 (file)
@@ -1214,8 +1214,11 @@ void InsetMathMacro::write(TeXMathStream & os) const
        }
 
        // add space if there was no argument
-       if (first)
+       // or add braces if we have optionals but none are present and [ follows
+       if (first) {
                os.pendingSpace(true);
+               os.useBraces(d->optionals_ > 0);
+       }
 
        // write \(no)limits modifiers if relevant
        writeLimits(os);