From: Enrico Forestieri Date: Tue, 20 Oct 2009 15:26:22 +0000 (+0000) Subject: Better fix for bug #6284. There's no need to check for spaces here X-Git-Tag: 2.0.0~5341 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=456449bd56cf898e90b28646658de8e333fa64db;p=features.git Better fix for bug #6284. There's no need to check for spaces here as they are already accounted for during the tokenization phase. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31687 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index 91baa45cd7..85f0f08fd5 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -1777,15 +1777,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags, if (mode == InsetMath::TEXT_MODE) { int num_tokens = 0; docstring cmd = prevToken().asInput(); - // Check whether we have a macro - // argument, taking into account that - // it may come after some spaces. CatCode cat = nextToken().cat(); - while (cat == catSpace) { - getToken(); - ++num_tokens; - cat = nextToken().cat(); - } if (cat == catBegin) { int count = 0; while (good() && (count || cat != catEnd)) { @@ -1797,12 +1789,6 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags, else if (cat == catEnd) --count; } - } else { - // No macro argument is present, - // so put back the spaces that - // we may have read. - for (; num_tokens; --num_tokens) - putback(); } bool is_combining; char_type c =