On Sun, Sep 23, 2007 at 02:43:02AM +0200, Dov Feldstern wrote:
>  Jean-Marc Lasgouttes wrote:
> > Abdelrazak Younes <[EMAIL PROTECTED]> writes:
> >>> do you have an easy fix handy ;-)
> >> What about this... could you try please?
> > How come cursorLeft does not set the font correctly? I tried to follow
> > that code, but I am not sure I understand. Ideally, the call to
> > setCurrentFont should be automatic.
> > JMarc
> 
>  Hi!
> 
>  Attached find a patch which fixes this issue.
> 
>  The actual fix is what's being done in the LFUN_FINISHED_* lfuns. The fixes 
>  in cursorLeft and cursorRight aren't relevant to the problem we're dealing 
>  with, but I'm pretty sure they are necessary for the cases they are meant to 
>  deal with (in fact, I think that currently the function being called is a 
>  void, although we're using it as a return?).
> 
>  I don't really understand all the implications of this change --- we should 
>  understand those before applying. But it does fix the current issue.
> 
>  The flow seems a little strange to me:
>  *) LFUN_CHAR_FORWARD calls cursorRight
>  *) cursorRight is in charge of almost all the cursor movement, except for 
>  the case of exiting an inset. In this case (end of last paragraph), 
>  cursorRight does nothing.
>  *) if cursorRight did nothing (well, if it didn't set needsUpdate and a few 
>  other things) then LFUN_FINISHED_RIGHT is called.
>  *) LFUN_FINISHED_RIGHT is where we move forward in this case, by just 
>  advancing the cursor position (and with this fix, set the font according to 
>  the new position).
> 
>  I don't understand why everything can't be done in cursorRight, and what the 
>  LFUN_FINISHED_* are needed for?
> 
>  Dov

No, these are a bit mysterious to me too.

Do I understand correctly that this fixes only the issue you 
have with ERT in a RtL setting? Have you tried in english text, 
to exit an ERT at end of paragraph and continue typimg?

- Martin

Reply via email to