On Thu, Sep 23, 2004 at 08:41:03PM +0200, Alfredo Braunstein wrote: > it seems that coordinate detection of nested math insets are messed up for > other than the first page of the document. > > If you go scroll down you cannot click inside some nested math inset, the > cursor is always stuck on the outer level.
Is this current cvs or cvs + my 'break it all' patch? (This does not really break all, but only uses different coordinates, but LyX feels badly broken with that). It's certainly not better with my patch, but this changes the coordinate handling and it's propably not worthwhile to spend time on coordinates on CVS without the patch. If you have two hours or so to spend I'd suggest to check out cvs+patch. I currently have neither hardware nor time for LyX which leaves 1.4 in a bit of a limbo. The idea of the patch is fairly simple: Forget all about coordinates and just decide where the cursor should be drawn on screen (of course one should somehow take the current paragraph into account, so there is not really much choice about the x coordinate). So lets say we start with cursor.y = 100. Rebreak and redraw the paragraph containg the cursor. If this does not reach the top of screen, rebreak and draw the paragraph above etc until the screen is filled above the cursor. Same for below. Inset x,y-cache will be absolute screen coordinates. On 'cursor down' set cursor.y += height of line until we hit bottom-\epsilon. Than we reset cursor.y to, say, 100 and are back to a situation we know already. Same for cursor up. Page down is going dow lines until we jumped over line worth, say, 3/4 of screen height. Scroll bar is rough estimation: #pars on screen/#pars in document. The framework is done in the patch and I think there's nothing onceptually missing. However, the coordinate cache is used more often than we'd wish (and sometimes wrongly so...), so finishing the patch is really a matter of time - which I don't have. On the other side, current CVS does not have proper coordinate handling either (as you've noticed...) so somebody has to fix either the one or the other... Andre' PS: This should not put you under pressure. You've certainly more important things to take care of right now and you should put your priorities there. This is merely meant to prevent you from starting fixing coordinates in plain CVS.