Martin Vermeer wrote:
On Sun, Sep 23, 2007 at 02:43:02AM +0200, Dov Feldstern wrote:

 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?


No, this fixes non-RTL issues as well. Plain English, \emph, etc. --- they all seem to work correctly now: upon exiting the inset, the font is set (in LFUN_FINISHED_*) to the font of the inset itself (not the text inside the inset, but of the inset itself!), which in turn was already set to the font that was active when the inset was created --- so that effectively, upon exiting an inset, the font is set back to what it was upon entering (which IMO is the correct behavior).

If there are no objections, I'll commit this tomorrow evening, then we'll found out if this also has any ill-effects... I'd still be happy if someone could clarify more about the flow, though...

- Martin



Dov

Reply via email to