From 333c17f879ce8863d4d49cd5f18440f100f5e17a Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 2 Apr 2010 15:22:50 +0000 Subject: [PATCH] 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 --- src/mathed/MathParser.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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()) -- 2.39.2