From a5fe7ae80ebbc4a89bb7d9ef61a8497466c75183 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 7 Mar 2003 15:22:53 +0000 Subject: [PATCH] Alfredo's correction git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6375 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/text3.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;