# HG changeset patch # User Richard M. Stallman # Date 1041440434 0 # Node ID 594a08370cb3b7bf8903a3cd375445a3c796f340 # Parent ce422542bd8d3c2568ced398e8bfe9f43e3d69a8 (window_scroll_pixel_based): Partially undo last change. diff -r ce422542bd8d -r 594a08370cb3 src/window.c --- a/src/window.c Wed Jan 01 16:59:54 2003 +0000 +++ b/src/window.c Wed Jan 01 17:00:34 2003 +0000 @@ -4147,9 +4147,11 @@ else move_it_by_lines (&it, n, 1); - /* End if we end up at ZV or BEGV. */ + /* We failed if we find ZV is already on the screen (scrolling up, + means there's nothing past the end), or if we can't start any + earlier (scrolling down, means there's nothing past the top). */ if ((n > 0 && IT_CHARPOS (it) == ZV) - || (n < 0 && IT_CHARPOS (it) == BEGV)) + || (n < 0 && IT_CHARPOS (it) == CHARPOS (start))) { if (IT_CHARPOS (it) == ZV) {