On Mon, Apr 06, 2009 at 01:34:22AM +0200, for...@lyx.org wrote: > Author: forenr > Date: Mon Apr 6 01:34:22 2009 > New Revision: 29118 > URL: http://www.lyx.org/trac/changeset/29118 > > Log: > Don't create nested text-in-math environments.
Jürgen, Ok for branch? Without this, when pasting "\text{§}" you woud get "\text{\text{§}}". > Modified: > lyx-devel/trunk/src/mathed/MathParser.cpp > > Modified: lyx-devel/trunk/src/mathed/MathParser.cpp > ============================================================================== > --- lyx-devel/trunk/src/mathed/MathParser.cpp Mon Apr 6 00:32:24 2009 > (r29117) > +++ lyx-devel/trunk/src/mathed/MathParser.cpp Mon Apr 6 01:34:22 2009 > (r29118) > @@ -910,7 +910,8 @@ > else if (t.cat() == catOther) { > char_type c = t.character(); > if (c < 0x80 || mode_ & Parse::VERBATIM > - || !(mode_ & Parse::USETEXT)) { > + || !(mode_ & Parse::USETEXT) > + || mode == InsetMath::TEXT_MODE) { > cell->push_back(MathAtom(new InsetMathChar(c))); > } else { > MathAtom at = createInsetMath("text"); > -- Enrico