From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Romain Francoise Newsgroups: gmane.emacs.devel Subject: Re: scroll-conservatively overflow Date: Sun, 02 May 2004 14:37:53 +0200 Organization: orebokech dot com Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87n04rgg2m.fsf@orebokech.com> References: <20040416114146.38AB.JMBARRANQUERO@wke.es> <87vfk0auk0.fsf@orebokech.com> <87d65p1yxk.fsf@orebokech.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083501628 19840 80.91.224.253 (2 May 2004 12:40:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 May 2004 12:40:28 +0000 (UTC) Cc: no-spam@cua.dk, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 02 14:40:21 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKGGb-0002Dx-00 for ; Sun, 02 May 2004 14:40:21 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKGGa-0000Tt-00 for ; Sun, 02 May 2004 14:40:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BKGG1-0005R3-PD for emacs-devel@quimby.gnus.org; Sun, 02 May 2004 08:39:45 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BKGF6-0004v3-C0 for emacs-devel@gnu.org; Sun, 02 May 2004 08:38:48 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BKGEX-0004XR-0N for emacs-devel@gnu.org; Sun, 02 May 2004 08:38:13 -0400 Original-Received: from [82.67.41.165] (helo=yeast.orebokech.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BKGEH-0004KD-4N; Sun, 02 May 2004 08:37:57 -0400 Original-Received: from swift (swift [192.168.1.6]) by yeast.orebokech.com (Postfix) with ESMTP id 208F112C3E; Sun, 2 May 2004 14:36:40 +0200 (CEST) Original-Received: by swift (Postfix, from userid 1000) id C628E182F7; Sun, 2 May 2004 14:37:53 +0200 (CEST) Original-To: rms@gnu.org Mail-Copies-To: nobody In-Reply-To: (Richard Stallman's message of "Sat, 01 May 2004 13:50:51 -0400") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22530 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22530 Richard Stallman writes: > I made that change to fix a specific bug. That function was returning > incorrect results in a certain case. I don't remember the test case, > unfortunately. Kim F. Storm kindly provided me with the original bug report so I've been able to reproduce it. > This change also makes the function cleaner because it handles vpos > like the various other values. Yes; I wasn't convinced at first that doing this was necessary, but now that I have looked into it in more detail I agree that it is cleaner this way. > Apparently the new code has another bug. That often happens. Could > you figure out precisely what the bug is? Then we could find the > right fix. I have spent some time reading the code and found the problem: you had overlooked a case where vpos needs to be saved in prev_vpos when dealing with continuation lines. Your change did not save the value even though it had been incremented to take into account the fact that the line is continued on another line, thus making the next iteration restore vpos from prev_vpos with a wrong value, which caused all my scrolling problems in Gnus and Dired. I suggest the following patch against CVS which merely saves vpos in prev_vpos in that case, and that fixes the various problems I was having. I have also checked that the original bug is still fixed with that change. Could you please install it? Index: src/indent.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/indent.c,v retrieving revision 1.160 diff -c -r1.160 indent.c *** src/indent.c 5 Apr 2004 21:41:08 -0000 1.160 --- src/indent.c 2 May 2004 11:54:42 -0000 *************** *** 1407,1412 **** --- 1407,1413 ---- vpos++; contin_hpos = prev_hpos; prev_hpos = 0; + prev_vpos = vpos; } } Suggested changelog entry: 2004-05-02 Romain Francoise (tiny change) * indent.c (compute_motion): Save vpos in prev_vpos when dealing with continuation lines, too. Thanks, -- Romain Francoise | This is a man's man's man's it's a miracle -- http://orebokech.com/ | world. --James Brown