Elazar Leibovich wrote:
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.

So it does not segfault aymore?

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

No space please: if (cur.isRTL())

+                       goto goto_char_backwards;
+                       
+               goto_char_forwards:

Hum... using goto is not recommended practice. Couldn't you just use our "standard" dispatch method instead?

                if (cur.isRTL())
                        cur.dispatch(FuncRequest(LFUN_CHAR_BACKWARD));

Maybe you'll need an additional flag to indicate that RTL should not be checked in LFUN_CHAR_BACKWARD.

Anyway, this is only style issues. More importantly, Dov, Mostafa, could you please confirm that what Elazar is proposing is the right thing to do? I seem to remember that some Arabic countries read math LTR and others RTL so maybe we need some kind of preference settings. Personally I'd be in favour of a cursor that follows the logical screen oriented arrows, be it for text or for math. But I am not just a novice; you guys should do some research for the perfect solution. If there is no such perfect solution we should allow the user to fine tune this via preference settings.

Abdel.

Reply via email to