bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5718: scroll-margin in buffer with small line count.


From: Eli Zaretskii
Subject: bug#5718: scroll-margin in buffer with small line count.
Date: Sun, 14 Aug 2016 05:36:19 +0300

> From: npostavs@users.sourceforge.net
> Cc: 5718@debbugs.gnu.org,  ahyatt@gmail.com,  gavenkoa@gmail.com
> Date: Sat, 13 Aug 2016 18:01:43 -0400
> 
> >>   this_scroll_margin = max (0, scroll_margin);
> >>   this_scroll_margin
> >>     = min (this_scroll_margin, window_total_lines / 4);
> >
> > Which reveals a subtle bug: the actual scroll margin should be 1 for 7
> > lines, 2 for 11, etc.  The problem is that the value of
> > window_total_lines includes the mode line, which it shouldn't.  Maybe
> > this should be fixed.
> 
> I was looking at fixing it, but I got confused by this comment in
> window.h:
> 
> /* Height in pixels, and in lines, of the mode line.
>    May be zero if W doesn't have a mode line.  */
> #define WINDOW_MODE_LINE_HEIGHT(W)    \
> 
> How is the height "in pixels, and in lines"?  Doesn't it have to be one
> or the other?

It's in pixels.  The comment should be fixed.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]