From: André Pönitz Date: Fri, 12 Oct 2001 13:05:21 +0000 (+0000) Subject: move selected part to script when pressing ^ or _ X-Git-Tag: 1.6.10~20491 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3e2e63a4b40e2acab99fe68eef27f6b1c3ef0e3f;p=lyx.git 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 --- diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index a89acb2933..0129b4531e 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -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;