]> git.lyx.org Git - features.git/commitdiff
Alfredo's correction
authorAngus Leeming <leeming@lyx.org>
Fri, 7 Mar 2003 15:22:53 +0000 (15:22 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 7 Mar 2003 15:22:53 +0000 (15:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6375 a592a061-630c-0410-9148-cb99ea01b6c8

src/text3.C

index fe595ee31ede8f253f1b66ef62639b2a3a99ee6b..0782e0fcf9577bfac6be0302053444f4fd36dcf1 100644 (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;