There's the gnome sollution which goes like that:
Capital letters are hebrew, small ones are English this | is the
cursor. We're in a LTR environment.
from the logical state abc |ABC which is displayed abc |CBA, when user
press RIGHT, we'll move to the following logical state "abc AB|C"
which will be displayed "abc C|BA".
This can be implemented as well, but seems unnessessary, since the
user sees in the case of Lyx, that he has entered a new inset. The
Advantage of this method are that directions are kept (left will
always move the cursor on the screen one step left), however one
reaches from the logical beginning of the formula to its end and vice
versa. I might implement the gnome sollution but it'll require me to
understand cursor movement handling including getting in and out an
inset. If someone could explain that to me and I'll include that in
the documentation - that'd be nice.
Anyway the only thing which is cetain is that the CURRENT situation,
in which a cursor is stuck in the formula is unacceptable, so please
accept my patch temporarily, so that it'd fixed in 1.5 final, even if
Dov et al wouldn't have time to answer.

On 4/29/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote:
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