On Mon, 2006-03-20 at 09:41 +0200, Martin Vermeer wrote:
> On Mon, 2006-03-20 at 07:49 +0100, Juergen Spitzmueller wrote:
> > Martin Vermeer wrote:
> > > This is a regression from 1.3. It should be possible, both with ^ _ keys
> > > and with the math panel (and directly with the commands math-superscript
> > > and math-subscript), to raise the selection to a superscript or lower it
> > > to a subscript. Works in 1.3.7.
> > 
> > Does this fix bug 2345?
> 
> No...should it? Looks completely unrelated to me.

... but the same trick works here too, see patch. Great intuition,
thanks!

- Martin
Index: math_nestinset.C
===================================================================
--- math_nestinset.C	(revision 13424)
+++ math_nestinset.C	(working copy)
@@ -798,11 +798,13 @@ void MathNestInset::doDispatch(LCursor &
 		if (currentMode() == InsetBase::MATH_MODE && cmd.argument == "on")
 			break;
 		cur.macroModeClose();
+		safe_ = grabAndEraseSelection(cur);
 		selClearOrDel(cur);
 		//cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv())));
 		cur.plainInsert(MathAtom(new MathBoxInset("mbox")));
 		cur.posLeft();
 		cur.pushLeft(*cur.nextInset());
+		cur.niceInsert(safe_);
 #else
 		if (currentMode() == InsetBase::TEXT_MODE) {
 			cur.niceInsert(MathAtom(new MathHullInset("simple")));

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to