John Levon wrote: > Tested, applied.
I accidentally slipped in two wrong changes... can someone apply the attached patch please? --- Also: Question 1): A Bufferview and some insets have a LyXText. There are a lot of LyxText methods that use bv->text->something, instead of plain something, to access the outermost LyXText, mainly for checking coordinates. Wouldn't be better to keep local coordinates somewhere (maybe on the containing inset or in the LyxText itself) and make LyXText to use that? Question 2): Is it possible with current code to embed the outermost LyXText in an inset? Or does the outermost LyXText behave substantially different than some inner LyXText? Question 3): Is there a plan already to upgrade/correct/replace LyXText and I am wasting time looking at it? Thanks, Alfredo
Index: text3.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/text3.C,v retrieving revision 1.40 diff -u -p -u -r1.40 text3.C --- text3.C 2003/03/06 20:21:18 1.40 +++ text3.C 2003/03/07 07:52:49 @@ -242,7 +242,7 @@ void LyXText::cursorPrevious(BufferView { if (!cursor.row()->previous()) { if (top_y() > 0) { - int new_y = top_y() - bv->workHeight(); + int new_y = bv->text->top_y() - bv->workHeight(); bv->screen().draw(bv->text, bv, new_y < 0 ? 0 : new_y); bv->updateScrollbar(); } @@ -298,7 +298,7 @@ void LyXText::cursorNext(BufferView * bv int y = cursor.y() - cursor.row()->baseline() + cursor.row()->height(); if (y > top_y() + bv->workHeight()) { - bv->screen().draw(bv->text, bv, top_y() + bv->workHeight()); + bv->screen().draw(bv->text, bv, bv->text->top_y() + bv->workHeight()); bv->updateScrollbar(); } return;