From 3e2e63a4b40e2acab99fe68eef27f6b1c3ef0e3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 12 Oct 2001 13:05:21 +0000 Subject: [PATCH] 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 --- src/mathed/math_cursor.C | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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; -- 2.39.5