Subject: Re: bug#546: scroll-margin not respected for downward scrolling when show-trailing-whitespace is t

From: [email-masked] (Johan Bockgård)
Date: Sat, 12 Jul 2008 18:17:38 +0200

Greg Falcon <[email-masked]> writes:

> When show-trailing-whitespace is on, the scroll-margin feature doesn't
> work when approaching the bottom of a window (though it does work for
> the top of a window). Setting show-trailing-whitespace to nil makes
> the problem go away.

(This was also reported a few months back,
http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-03/msg00019.html)

It used to not work for the top as well as for the bottom margins. That
bug was fixed three years ago,

http://lists.gnu.org/archive/html/emacs-devel/2005-06/msg01561.html

  2005-06-25  Richard M. Stallman  <[email-masked]>

          * macfns.c (Fx_show_tip): Pass new arg to try_window.

          * w32fns.c (Fx_show_tip): Pass new arg to try_window.

          * xfns.c (Fx_show_tip): Pass new arg to try_window.

          * xdisp.c (try_window): New arg CHECK_MARGINS.  Calls changed.
          (redisplay_window): Handle try_window reporting point in scroll
          margin.

          * dispextern.h (try_window): Declare new arg.

It seems it was broken again (for the bottom margin) a week later,

http://lists.gnu.org/archive/html/emacs-devel/2005-07/msg00244.html

  2005-07-03  Richard M. Stallman  <[email-masked]>

          * xdisp.c (try_window): Fix previous change in how it handles
          a partially-visible line or one only partly past the margin.

          * window.c (window_scroll_pixel_based): Take account
          of this_scroll_margin when finding point when scrolling up.

-- 
Johan Bockgård