From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kelly Dean Newsgroups: gmane.emacs.bugs Subject: bug#19060: [FIX INCLUDED] Off-by-one-line scrolling bug in window_scroll_pixel_based Date: Sat, 15 Nov 2014 06:57:45 +0000 Message-ID: <37096.3741479956$1416038741@news.gmane.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1416038741 8852 80.91.229.3 (15 Nov 2014 08:05:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 08:05:41 +0000 (UTC) To: 19060@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 15 09:05:33 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XpYMM-0006u4-Up for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Nov 2014 09:05:31 +0100 Original-Received: from localhost ([::1]:39407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpYMM-0003yz-IB for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Nov 2014 03:05:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpYM6-0003xP-PX for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 03:05:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpYLw-0006di-H9 for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 03:05:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpYLw-0006dY-Ep for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 03:05:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XpYLw-0005bT-8S for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 03:05:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kelly Dean Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Nov 2014 08:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19060 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141603865221328 (code B ref -1); Sat, 15 Nov 2014 08:05:04 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Nov 2014 08:04:12 +0000 Original-Received: from localhost ([127.0.0.1]:33181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XpYL5-0005Xo-Hn for submit@debbugs.gnu.org; Sat, 15 Nov 2014 03:04:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60019) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XpXXl-0003J5-Qb for submit@debbugs.gnu.org; Sat, 15 Nov 2014 02:13:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpXXb-0001ns-Lm for submit@debbugs.gnu.org; Sat, 15 Nov 2014 02:13:13 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXXb-0001no-Jq for submit@debbugs.gnu.org; Sat, 15 Nov 2014 02:13:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXXR-0002BR-Fa for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 02:13:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpXXH-0001lq-BA for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 02:12:53 -0500 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:41268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXXH-0001lF-5F for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 02:12:43 -0500 Original-Received: from mfilter33-d.gandi.net (mfilter33-d.gandi.net [217.70.178.164]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id BFE68FB882 for ; Sat, 15 Nov 2014 08:12:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter33-d.gandi.net Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter33-d.gandi.net (mfilter33-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id GplW46Ybw7kK for ; Sat, 15 Nov 2014 08:12:41 +0100 (CET) X-Originating-IP: 73.169.42.166 Original-Received: from localhost (c-73-169-42-166.hsd1.co.comcast.net [73.169.42.166]) (Authenticated sender: kelly@prtime.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 7C3E4FB877 for ; Sat, 15 Nov 2014 08:12:39 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sat, 15 Nov 2014 03:04:08 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96048 With 24.4, emacs -Q, then M-x split-window-horizontally, then open any fi= le with a lot of long logical lines (each a few visual lines long), so th= at as you page down through the file, every screenful of text has some wr= apped lines on it. Adjust the vertical size of your Emacs frame so that t= he 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 c= overed 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 pr= evious 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 chan= ge =E2=8C=9Cwindow_box_height (w)=E2=8C=9D on that line to =E2=8C=9Cwindo= w_box_height (w) / dy * dy=E2=8C=9D in order to align the result to an in= teger multiple of the visual line height, since as of 24.4, Emacs no long= er 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 have= n't tested that. BTW on line 471 (copied from line 466) of window.h, =E2=80=9Fwidth=E2=80=9D= should be =E2=80=9Fheight=E2=80=9D.