Checks the directionality of the paragraph, and makes cursor Forward
requests into cursor backwards and vice versa.
Extremly easy, relies on cursor's isRTL() method.
Index: src/mathed/InsetMathNest.cpp
===================================================================
--- src/mathed/InsetMathNest.cpp	(revision 18090)
+++ src/mathed/InsetMathNest.cpp	(working copy)
@@ -494,6 +494,10 @@
 		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);
@@ -513,6 +517,10 @@
 		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());

Reply via email to