From: Vincent van Ravesteijn Date: Fri, 2 Apr 2010 15:22:50 +0000 (+0000) Subject: Fix bug #6633: Equations that end in \limits or \nolimits are corrupted on load. X-Git-Tag: 2.0.0~3563 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=333c17f879ce8863d4d49cd5f18440f100f5e17a;p=features.git Fix bug #6633: Equations that end in \limits or \nolimits are corrupted on load. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34025 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index f80dba7303..76f3981c37 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -1316,11 +1316,15 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags, } #endif - else if (t.cs() == "limits") - limits = 1; - - else if (t.cs() == "nolimits") - limits = -1; + else if (t.cs() == "limits" || t.cs() == "nolimits") { + CatCode cat = nextToken().cat(); + if (cat == catSuper || cat == catSub) + limits = t.cs() == "limits" ? 1 : -1; + else { + MathAtom at = createInsetMath(t.cs(), buf); + cell->push_back(at); + } + } else if (t.cs() == "nonumber") { if (grid.asHullInset())