GNU bug report logs -
#19060
[FIX INCLUDED] Off-by-one-line scrolling bug in window_scroll_pixel_based
Previous Next
Reported by: Kelly Dean <kelly <at> prtime.org>
Date: Sat, 15 Nov 2014 08:05:04 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 15 Nov 2014 19:06:55 +0200
with message-id <831tp4fl5c.fsf <at> gnu.org>
and subject line Re: bug#19060: [FIX INCLUDED] Off-by-one-line scrolling bug in window_scroll_pixel_based
has caused the debbugs.gnu.org bug report #19060,
regarding [FIX INCLUDED] Off-by-one-line scrolling bug in window_scroll_pixel_based
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
19060: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19060
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
With 24.4, emacs -Q, then M-x split-window-horizontally, then open any file with a lot of long logical lines (each a few visual lines long), so that as you page down through the file, every screenful of text has some wrapped lines on it. Adjust the vertical size of your Emacs frame so that the vertical size of your Emacs windows is not an integer multiple of the visual line height, so that the bottom visual line of text is partially covered by the top of the mode line.
Scroll forward a couple pages using pgdn (scroll-up-command), then notice exactly which visual line is at the top, and which one is at the bottom. Press pgdn, then pgup, and notice that the text doesn't return to the previous position; instead, it's scrolled backward by one visual line. This bug wasn't in 24.3.
The bug is in window.c of the 24.4 release, line 5042. The fix is to change ⌜window_box_height (w)⌝ on that line to ⌜window_box_height (w) / dy * dy⌝ in order to align the result to an integer multiple of the visual line height, since as of 24.4, Emacs no longer ensures that window_box_height is such a multiple. Patch excluded, per request.
There might be a related bug (with the same fix) on line 4959, but I haven't tested that.
BTW on line 471 (copied from line 466) of window.h, ‟width” should be ‟height”.
[Message part 3 (message/rfc822, inline)]
> Date: Sat, 15 Nov 2014 15:32:41 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: kelly <at> prtime.org, 19060 <at> debbugs.gnu.org
>
> > Since the issue is rounding vs truncating, perhaps try playing with
> > the portion of the last displayed line, trying both less and greater
> > than half the canonical line height.
>
> Got it. The last line must show more than a half of the frame's
> character height. And the patch fixes it AFAICT. So please apply it
> with as much comment as you can provide.
Done on the emacs-24 branch.
This bug report was last modified 10 years and 192 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.