Alfredo's correction

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6375 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-03-07 15:22:53 +00:00
parent e22ee4208d
commit a5fe7ae80e

View File

@ -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;