It might be incorrect. But it cannot cause a crash. A paragraph always starts at 0 and ends at par.size()-1. So as long as we stay in this interval the computeTables is safe, even if the metrics are not the right one. Can you try to make a patch implementing a setCurrentFont flag in the cursor update flags? I could imagine that it is not so complicated after all anyway. Let's see.

I'm willing to try, but as I said, I don't have nearly as much time to put into LyX as I'd like to, so it'll take a while --- I don't believe I'll get to it this week. So in the meantime one of the hacks (up to you) should be applied, just mark it clearly with a FIXME and an outline of the correct solution, as Andre' pointed out...

I tried to implement the "clean" approach, i.e. adding another Update::flag. But it didn't work that well. In fact the whole handling of the updates in the Text class is anything but cleanly implemented. The Update::flags are not really used there as they should be.

So we are left now with the simple fix with the std::min in Bidi.cpp and an explicit paragraph recalculation. I start thinking that the latter is the simplest and cleanest we can do at the moment. Maybe tomorrow...

Stefan

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to