[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scroll-conservatively overflow

From: Romain Francoise
Subject: Re: scroll-conservatively overflow
Date: Sun, 02 May 2004 14:37:53 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> 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 ----
              contin_hpos = prev_hpos;
              prev_hpos = 0;
+             prev_vpos = vpos;

Suggested changelog entry:

2004-05-02  Romain Francoise  <address@hidden>  (tiny change)

        * indent.c (compute_motion): Save vpos in prev_vpos when dealing
        with continuation lines, too.


Romain Francoise <address@hidden> | This is a man's man's man's
it's a miracle -- http://orebokech.com/ | world. --James Brown

reply via email to

[Prev in Thread] Current Thread [Next in Thread]