Jean-Marc Lasgouttes wrote: >>>>>> "Alfredo" == Alfredo Braunstein >>>>>> <[EMAIL PROTECTED]> writes: > > Alfredo> Jean-Marc Lasgouttes wrote: >>> Where is the relevant code? I guess that real_current_font, which >>> is just a cache is not updated at this point (you get the size of >>> Author paragraph). > > Alfredo> LCursor::getDim > >>> So you may have to make sure it is updated. > > Alfredo> Ah, ok. So we have to add a call to setCurrentFont somewhere. > > The situation is better now, but not perfect. Look for example at what > happens when using find/replace or spellcheck. Cursor size is not
Right. The fix was to replace manual adjustment of cur.pit, cur.pos with a call to setCursor that does that + DEPM + setCurrentFont. The same could be done in other places as well, but probably it would be much better to find a smart place to place a single call: like at the end of the dispatch line or something. > updated. I found your remark in the code about moving this font cache > to LCursor interesting... It will only work if the variables are > always used with a cursor around, though. But I think they are: you set the default font when positioning the cursor. Right now it would be dead easy, as the signature of setCurrentFont is void LyXText::setCurrentFont(LCursor & cur) In fact the default font is/should be associated with the cursor IMO: with multiple views, you may want to set different cursors to different fonts to type. > Navigating in insets seems much better. Thanks. You're welcome. Unfortunately navigation in math is still broken, and now becomes more evident because is easier to enter math insets. ;-) Alfredo