GNU bug report logs - #5718
scroll-margin in buffer with small line count.

Previous Next

Package: emacs;

Reported by: Oleksandr Gavenko <gavenkoa <at> gmail.com>

Date: Sun, 14 Mar 2010 17:28:02 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #31 received at 5718 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: npostavs <at> users.sourceforge.net
Cc: ahyatt <at> gmail.com, 5718 <at> debbugs.gnu.org, gavenkoa <at> gmail.com
Subject: Re: bug#5718: scroll-margin in buffer with small line count.
Date: Sun, 14 Aug 2016 05:36:19 +0300
> From: npostavs <at> users.sourceforge.net
> Cc: 5718 <at> debbugs.gnu.org,  ahyatt <at> gmail.com,  gavenkoa <at> 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.




This bug report was last modified 8 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.