]> git.lyx.org Git - features.git/commitdiff
fix parser bug reportred by Rob.
authorAndré Pönitz <poenitz@gmx.net>
Mon, 5 Aug 2002 07:14:26 +0000 (07:14 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Mon, 5 Aug 2002 07:14:26 +0000 (07:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4858 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_parser.C

index 20038c420cdca4f3b9606feaef1d947c17119322..942558f1506af0f856094f972367aa39404cffef 100644 (file)
@@ -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())