From acb7906fb5d3db88e43f61b3b25c841d3aac63a0 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Fri, 21 Feb 2014 21:31:35 +0100 Subject: [PATCH] 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. --- src/mathed/InsetMathNest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 3d31b9ac79..c110e12a13 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 -- 2.39.5