]> git.lyx.org Git - features.git/commitdiff
Fix remaining part of bug #8967
authorGeorg Baum <baum@lyx.org>
Fri, 21 Feb 2014 20:31:35 +0000 (21:31 +0100)
committerGeorg Baum <baum@lyx.org>
Fri, 21 Feb 2014 20:31:35 +0000 (21:31 +0100)
Now interactive insertion of \smash[t] and \smash[b] is possible again.
\smash with optional argument behaves now exactly as in LyX 2.0.x, and without
optional argument it is supported by InsetMathPhantom.

src/mathed/InsetMathNest.cpp

index 3d31b9ac79930aa5e3d3e220bf73a536113352a1..c110e12a13db8cbc617196e5dfa999ca6e7c389f 100644 (file)
@@ -1686,6 +1686,13 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c)
                                        new InsetMathBig(name.substr(1), delim)));
                                return true;
                        }
+               } else if (name == "\\smash" && c == '[') {
+                       // We can't use cur.macroModeClose() because
+                       // it would create an InsetMathPhantom
+                       InsetMathUnknown * p = cur.activeMacro();
+                       p->finalize();
+                       interpretChar(cur, c);
+                       return true;
                }
 
                // leave macro mode and try again if necessary