bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6671: moving point and scroll-conservatively


From: Chong Yidong
Subject: bug#6671: moving point and scroll-conservatively
Date: Wed, 23 Mar 2011 23:58:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Juanma Barranquero <lekktu@gmail.com> writes:

>> Is the "unintended recentering" problem purely associated with the
>> commands next-line and previous-line?
>
> Other scrolling commands, like scroll-up-command, do respect
> scroll-preserve-scroll-position and do not cause unexpected
> recentering, though their performance isn't currently very good (try
> keeping PgDn pressed in xdisp.c...).

OK.

After playing around with the "C-n in xdisp.c" testcase with the changes
in revision 100619/100620 reverted, I think I know the problem.

In this test case, recentering seems to be triggered by redisplay-time
fontification.  To demonstrat this, set fontification-functions to nil
in xdisp.c, before initiating the C-n testcase.  For me, at least, the
anomalous recentering then does not occur.

The precise mechanism by which the fontification functions screw things
up is by narrowing the buffer.  This is why, in last year's thread, the
buffer's clip_changed flag was found to be set.  That forces recentering
in redisplay_window (xdisp.c:14159).

So, a good fix might be to check whether redisplay-time fontification
changes the buffer's restrictions, and, if so, reset the clip_changed
flag.  That should make the 100619/100620 changes unnecessary.





reply via email to

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