From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21080: Scrolling bug Date: Sat, 18 Jul 2015 13:07:20 +0300 Message-ID: <83h9p16ap3.fsf@gnu.org> References: <83vbdi64ll.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1437214098 12464 80.91.229.3 (18 Jul 2015 10:08:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2015 10:08:18 +0000 (UTC) Cc: 21080-done@debbugs.gnu.org To: Bru Rom Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 18 12:08:09 2015 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 1ZGP2P-0002cr-9k for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 12:08:09 +0200 Original-Received: from localhost ([::1]:47795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGP2O-0000OO-Me for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 06:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGP2L-0000MD-Q3 for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2015 06:08:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGP2I-00062e-JS for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2015 06:08:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGP2I-00062Y-FS for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2015 06:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZGP2I-0004Gm-AK for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2015 06:08:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jul 2015 10:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 21080 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Mail-Followup-To: 21080@debbugs.gnu.org, eliz@gnu.org, sortir@gmail.com Original-Received: via spool by 21080-done@debbugs.gnu.org id=D21080.143721403716353 (code D ref 21080); Sat, 18 Jul 2015 10:08:01 +0000 Original-Received: (at 21080-done) by debbugs.gnu.org; 18 Jul 2015 10:07:17 +0000 Original-Received: from localhost ([127.0.0.1]:52547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGP1Y-0004Fg-BR for submit@debbugs.gnu.org; Sat, 18 Jul 2015 06:07:16 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:46572) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGP1V-0004FO-PG for 21080-done@debbugs.gnu.org; Sat, 18 Jul 2015 06:07:14 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NRO00500H6VIP00@a-mtaout23.012.net.il> for 21080-done@debbugs.gnu.org; Sat, 18 Jul 2015 13:07:07 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NRO005DFHFUCM90@a-mtaout23.012.net.il>; Sat, 18 Jul 2015 13:07:07 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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:105017 Archived-At: > Date: Sat, 18 Jul 2015 00:58:14 +0300 > From: Bru Rom > > It can be any file with long enough lines. > > For standard terminal 80x24, let the part of wikipedia article on Emacs be our > "sample file". Emacs history from it: > [...] > Copy text to file, open it in Emacs with emacs -nw -Q > > Next, exact sequence of commands: > > alt-x customize-option > scroll-conservatively > Set there 10000, tab into state, enter state, press 0 = Set for Current Session > Press 'q' to exit > > Then alt-x visual-line-mode > > Then C-End to go to end of buffer. Then scroll up line-by-line with Up. It > scrolls by 2 over warped lines, but if you go down from start of buffer - > everything will be ok. Thanks. This bug is now fixed in the development sources with the simple change below (which you could probably easily apply to 24.5 or previous versions, as that code was in Emacs since Mar 2002). commit d3816bf8ad1fcfed2a32d23216a55850ee4325b5 Author: Eli Zaretskii Date: Sat Jul 18 13:02:06 2015 +0300 Fix scrolling backwards on TTY frames under scroll-conservatively * src/xdisp.c (move_it_vertically_backward): Fix off-by-one error in moving backwards on TTY frames. (Bug#21080) diff --git a/src/xdisp.c b/src/xdisp.c index 5bef44c..16a7a64 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9428,7 +9428,7 @@ struct overlay_entry treating terminal frames specially here. */ if (!FRAME_WINDOW_P (it->f)) - move_it_vertically (it, target_y - (it->current_y + line_height)); + move_it_vertically (it, target_y - it->current_y); else { do