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 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));
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'
