From: Angus Leeming Date: Fri, 7 Mar 2003 15:22:53 +0000 (+0000) Subject: Alfredo's correction X-Git-Tag: 1.6.10~17334 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a5fe7ae80ebbc4a89bb7d9ef61a8497466c75183;p=features.git Alfredo's correction git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6375 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/text3.C b/src/text3.C index fe595ee31e..0782e0fcf9 100644 --- a/src/text3.C +++ b/src/text3.C @@ -242,7 +242,7 @@ void LyXText::cursorPrevious(BufferView * bv) { 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;