>I don't remember: is it correct that boundary only affect the cursor's
display?

No, probably not. If the cursor is displayed somewhere else, newly
entered text will appear somewhere else.

>If so, and if we're correct that the metrics will not exist only when
the
>cursor's paragraph is off the screen, then your fix would seem to be
safe...

>But then the question is: why is a function which only affects the
cursor's
>display being called when the cursor is off the screen? In other words,
if
>our above assumptions are correct, then the function should not
actually
>be called at all when we're off the screen --- but it is...

It's triggered by a timer, and it is not explicitly checked where the
cursor is.

>...I noticed that only when we're at the end of a word, but not
anywhere else,
>then a line is printed every time the cursor blinks --- whether or not
the cursor
>is on the screen. 
> ...
> In other words: something is causing isRTLBoundary to be called every
time
>the cursor blinks when it is at the end of the word, even if it is off
the screen,
>and the first time that that happens, there are no metrics!

See Cursor::getFont():

// on space? Take the font before (only for RTL boundary stay)
if (pos > 0) {
    TextMetrics const & tm = bv().textMetrics(&text);
    if (pos == sl.lastpos()
      || (par.isSeparator(pos)
      && !tm.isRTLBoundary(sl.pit(), pos)))
         --pos;
}

This is why isRTLBoundary is called for each blink if the cursor is only
at the end of a wordt... (or on a space).

>Dov

Vincent

Reply via email to