From: Richard M. Stallman Date: Wed, 1 Jan 2003 17:00:34 +0000 (+0000) Subject: (window_scroll_pixel_based): Partially undo last change. X-Git-Tag: ttn-vms-21-2-B4~11868 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=96ae58c8acaecb6907897a4c928cba4f4eee3e58;p=emacs.git (window_scroll_pixel_based): Partially undo last change. --- diff --git a/src/window.c b/src/window.c index 3f115260adf..83440f440cc 100644 --- a/src/window.c +++ b/src/window.c @@ -4147,9 +4147,11 @@ window_scroll_pixel_based (window, n, whole, noerror) 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) {