commit acb7906fb5d3db88e43f61b3b25c841d3aac63a0
Author: Georg Baum <[email protected]>
Date:   Fri Feb 21 21:31:35 2014 +0100

    Fix remaining part of bug #8967
    
    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.

diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index 3d31b9a..c110e12 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -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

Reply via email to