Fix cursor movement in RTL embedded math insets by Elazar Leibovich.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18241 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-05-09 09:42:33 +00:00
parent f5cfb824aa
commit 31c9218c7e

View 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());