Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-04 Thread Abdelrazak Younes
Andre Poenitz wrote: On Fri, May 04, 2007 at 04:07:18PM +0300, Dov Feldstern wrote: Andre Poenitz wrote: The LFUNs are named wrongly. It should be 'LFUN_CHAR_LEFT', since that's what's supposed to happen on screen. This could be mapped to LFUN_CHAR_BACKWARD denepding on isRTL() for 'logical' mo

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-04 Thread Andre Poenitz
On Fri, May 04, 2007 at 04:07:18PM +0300, Dov Feldstern wrote: > Andre Poenitz wrote: > > > >The LFUNs are named wrongly. It should be 'LFUN_CHAR_LEFT', since that's > >what's supposed to happen on screen. This could be mapped to > >LFUN_CHAR_BACKWARD denepding on isRTL() for 'logical' movement. >

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-04 Thread Abdelrazak Younes
Andre Poenitz wrote: On Fri, May 04, 2007 at 03:54:41PM +0300, Dov Feldstern wrote: Hi! This works for me too, so as far as I'm concerned, this should go in (and thanks, Elazar!). If anyone really objects to using "goto", it could be implemented by separating the actual functionality into se

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-04 Thread Andre Poenitz
On Fri, May 04, 2007 at 03:54:41PM +0300, Dov Feldstern wrote: > Hi! > > This works for me too, so as far as I'm concerned, this should go in > (and thanks, Elazar!). If anyone really objects to using "goto", it > could be implemented by separating the actual functionality into > separate funct

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-04 Thread Dov Feldstern
Andre Poenitz wrote: The LFUNs are named wrongly. It should be 'LFUN_CHAR_LEFT', since that's what's supposed to happen on screen. This could be mapped to LFUN_CHAR_BACKWARD denepding on isRTL() for 'logical' movement. Andre' I'm not sure that this is correct: precisely in the situations we'

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-04 Thread Abdelrazak Younes
Dov Feldstern wrote: Hi! This works for me too, so as far as I'm concerned, this should go in (and thanks, Elazar!). If anyone really objects to using "goto", it could be implemented by separating the actual functionality into separate functions --- one for left and one for right, similarly t

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-04 Thread Dov Feldstern
Hi! This works for me too, so as far as I'm concerned, this should go in (and thanks, Elazar!). If anyone really objects to using "goto", it could be implemented by separating the actual functionality into separate functions --- one for left and one for right, similarly to how it's done in h

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-02 Thread Dov Feldstern
Elazar Leibovich wrote: 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. Hi! I'm sorry, I'm bus

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-05-01 Thread Elazar Leibovich
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

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-30 Thread Elazar Leibovich
My patch "Works for me" very well, the cursor never got stuck. Can you specify me how to recreate the problem? On 4/30/07, Elazar Leibovich <[EMAIL PROTECTED]> wrote: Hmm... I'll look at it. But what can cause this? Is it still recognizing we're in RTL there? My code simply reverse the dispatche

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-30 Thread Elazar Leibovich
Hmm... I'll look at it. But what can cause this? Is it still recognizing we're in RTL there? My code simply reverse the dispatcher signal. On 4/30/07, Abdelrazak Younes <[EMAIL PROTECTED]> wrote: Elazar Leibovich wrote: > Hold on. It does segfaults, but this is not me, this is the isRTL > functi

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-30 Thread Abdelrazak Younes
Elazar Leibovich wrote: Hold on. It does segfaults, but this is not me, this is the isRTL function implemented in Cursor.cpp. It's fails when it tries to ask a LyxText from the CursorSlice it occurs in. Can someone help me fix this function? It's fixed now. I've tried your patch, it seems to fi

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-30 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Elazar" == Elazar Leibovich <[EMAIL PROTECTED]> writes: Elazar> Please note the following strange piece of code from Elazar> inset.h:404 which causes the problem: virtual LyXText * Elazar> getText(int /*num*/) const { return 0; } That is, when you're Elazar> asking

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-30 Thread Jean-Marc Lasgouttes
> "Elazar" == Elazar Leibovich <[EMAIL PROTECTED]> writes: Elazar> Please note the following strange piece of code from Elazar> inset.h:404 which causes the problem: virtual LyXText * Elazar> getText(int /*num*/) const { return 0; } That is, when you're Elazar> asking an inset to recieve its t

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-30 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> I could, but I'd wait for Jean-Marc's comment... Sure we should do it eventually. It does not strike me as a 1.5 thing, but the risk is definitely low. JMarc

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-30 Thread Elazar Leibovich
Please note the following strange piece of code from inset.h:404 which causes the problem: virtual LyXText * getText(int /*num*/) const { return 0; } That is, when you're asking an inset to recieve its text you're getting NULL, however, the CursorSlice object uses (inset_.getText()) in order to re

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-30 Thread Abdelrazak Younes
Elazar Leibovich wrote: Hold on. It does segfaults, but this is not me, this is the isRTL function implemented in Cursor.cpp. It's fails when it tries to ask a LyxText from the CursorSlice it occurs in. Can someone help me fix this function? Yes, I see the problem now: When in mathed, the top C

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-29 Thread Elazar Leibovich
Hold on. It does segfaults, but this is not me, this is the isRTL function implemented in Cursor.cpp. It's fails when it tries to ask a LyxText from the CursorSlice it occurs in. Can someone help me fix this function? How can I get to the head of the paragraph (or some place not in an inset) that

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-29 Thread Andre Poenitz
On Sun, Apr 29, 2007 at 11:37:05PM +0200, Abdelrazak Younes wrote: > Andre Poenitz wrote: > >The LFUNs are named wrongly. It should be 'LFUN_CHAR_LEFT', since that's > >what's supposed to happen on screen. This could be mapped to > >LFUN_CHAR_BACKWARD denepding on isRTL() for 'logical' movement. >

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-29 Thread Abdelrazak Younes
Andre Poenitz wrote: The LFUNs are named wrongly. It should be 'LFUN_CHAR_LEFT', since that's what's supposed to happen on screen. This could be mapped to LFUN_CHAR_BACKWARD denepding on isRTL() for 'logical' movement. Yes, I remember JMarc stating something like this. Could you do it? Abdel.

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-29 Thread Andre Poenitz
On Sun, Apr 29, 2007 at 10:57:12PM +0200, Abdelrazak Younes 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 ay

Re: [patch] Bidirectional cursor movement in Mathed Inset

2007-04-29 Thread Abdelrazak Younes
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 ===

[patch] Bidirectional cursor movement in Mathed Inset

2007-04-29 Thread Elazar Leibovich
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