]> git.lyx.org Git - features.git/commitdiff
Fix cursor movement in RTL embedded math insets by Elazar Leibovich.
authorAbdelrazak Younes <younes@lyx.org>
Wed, 9 May 2007 09:42:33 +0000 (09:42 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 9 May 2007 09:42:33 +0000 (09:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18241 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathNest.cpp

index 2941b4c32fbc9692e44af9451ec40af9e1092fa4..8c835a0f7f06d25f8754b62944888a191e0b1f12 100644 (file)
@@ -492,6 +492,10 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                cur.autocorrect() = false;
                cur.clearTargetX();
                cur.macroModeClose();
+               if (cur.isRTL() )
+                       goto goto_char_backwards;
+
+goto_char_forwards:
                if (cur.pos() != cur.lastpos() && cur.openable(cur.nextAtom())) {
                        cur.pushLeft(*cur.nextAtom().nucleus());
                        cur.inset().idxFirst(cur);
@@ -511,6 +515,10 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                cur.autocorrect() = false;
                cur.clearTargetX();
                cur.macroModeClose();
+               if (cur.isRTL())
+                       goto goto_char_forwards;
+
+goto_char_backwards:
                if (cur.pos() != 0 && cur.openable(cur.prevAtom())) {
                        cur.posLeft();
                        cur.push(*cur.nextAtom().nucleus());