move selected part to script when pressing ^ or _

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2869 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-10-12 13:05:21 +00:00
parent 6317b96d19
commit 3e2e63a4b4

View File

@ -1318,18 +1318,14 @@ void MathCursor::interpret(char c)
prevAtom()->asScriptInset()->ensure(up);
pushRight(prevAtom());
pos() = size();
idx() = up;
return;
}
if (hasNextAtom() && nextAtom()->asScriptInset()) {
} else if (hasNextAtom() && nextAtom()->asScriptInset()) {
nextAtom()->asScriptInset()->ensure(up);
pushLeft(nextAtom());
pos() = 0;
idx() = up;
return;
} else {
plainInsert(MathAtom(new MathScriptInset(up)));
pushRight(prevAtom());
}
plainInsert(MathAtom(new MathScriptInset(up)));
pushRight(prevAtom());
idx() = up;
selPaste();
return;