From ff19a20470bdcaa367a9891f0b6972cf31ef77df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Mon, 5 Aug 2002 07:14:26 +0000 Subject: [PATCH] fix parser bug reportred by Rob. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4858 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_parser.C | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 20038c420c..942558f150 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -652,7 +652,9 @@ void Parser::parse1(MathGridInset & grid, unsigned flags, bool up = (t.cat() == catSuper); // we need no new script inset if the last thing was a scriptinset, // which has that script already not the same script already - if (cell->size() && cell->back()->asScriptInset() && + if (!cell->size()) + cell->push_back(MathAtom(new MathScriptInset(up))); + else if (cell->back()->asScriptInset() && !cell->back()->asScriptInset()->has(up)) cell->back()->asScriptInset()->ensure(up); else if (cell->back()->asScriptInset()) -- 2.39.2