Helge Hafting wrote: > Mathed can be brought into a strange state where the keys ^ and _ doesn't > work as expected. > > 1. Activate math, type the word test > 2. Press ^ to get superscript > 3. Press space, this ought to cancel superscript > 4. Press ^ again, note that instead of a superscript, > the last "t" in "test" get those pink corners, suggesting that it > has been turned into an entity of its own.
Yes, this is a regression. The attached patch fixes it, so that the expected script is inserted (the corners are still there, indicating that the last letter "t" is the base of the script inset). This also fixes bug 2139 (No exponent and subscript in Sum, Prod and other similar symbols). Please test. Jürgen
Index: src/mathed/math_nestinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.C,v retrieving revision 1.177 diff -p -u -r1.177 math_nestinset.C --- src/mathed/math_nestinset.C 22 Nov 2005 13:52:25 -0000 1.177 +++ src/mathed/math_nestinset.C 1 Dec 2005 13:06:48 -0000 @@ -1249,6 +1249,7 @@ bool MathNestInset::script(LCursor & cur --cur.pos(); MathScriptInset * inset = cur.nextAtom().nucleus()->asScriptInset(); cur.push(*inset); + inset->ensure(up); cur.idx() = inset->idxOfScript(up); cur.pos() = cur.lastpos(); } else {