Subject: bug#42653: 28.0.50; scroll-margin is sometimes ignored with hl-line/display-line-numbers-mode

From: Eli Zaretskii <[email-masked]>
Date: Sun, 02 Aug 2020 18:33:35 +0300

> From: Kevin Liu <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 01 Aug 2020 10:32:13 -0700
> 
> On  1 August 2020 09:44, Eli Zaretskii <[email-masked]> wrote:
> 
> > I only see this when EOB is before end of the window, which I don't
> > think is a bug.
> 
> Could you elaborate on this?  I don't understand why it's proper for
> hl-line-mode and display-line-numbers-mode to affect scrolling behavior
> in any scenario, much less this one.

Indeed, they shouldn't.  I've misinterpreted the test case, sorry.

There was a 15-year old code that handled the logic of scroll-margin
when EOB is visible, and it had a bug.  This should now be fixed on
the master branch.