[Bug: 21.4.15] Bad interaction between scroll-conservatively, scroll-step and beginning-of-buffer.
james at xemacs.org
Mon May 3 13:09:54 EDT 2004
> With the divide by zero fix I just sent to xemacs-patches, I found that
> the profiler returned pretty much immediately upon pressing M-<, and
> reported that too little time to measure had passed ... whereupon there
> was a long delay until the buffer of interest was redrawn. So it looks
> like M-< executes pretty much instantly, and the problem is somewhere in
Look at this code in redisplay.c (lines 6583 - 6598 in current CVS):
/* We still haven't gotten the window regenerated with point
visible. Next we try scrolling a little and see if point comes
back onto the screen. */
if (scroll_step > 0)
int scrolled = scroll_conservatively;
for (; scrolled >= 0; scrolled -= scroll_step)
startp = vmotion (w, startp,
(pointm < startp) ? -scroll_step : scroll_step, 0);
regenerate_window (w, startp, pointm, DESIRED_DISP);
if (point_visible (w, pointm, DESIRED_DISP))
Setting a breakpoint here with GDB shows that this part of the code is
NOT hit when doing M->, but is when doing M-<. Basically, on M-< with
Lawrence's variable settings, we are scrolling the buffer back one line
at a time and asking, "Are we there yet? I have to go to the bathroom!
Jimmy's touching me!"
If the place we are trying to reach is "close", this makes sense. So
why don't we get here when doing M->? Does some code elsewhere note
that we are going "far away" and skip this altogether somehow?
More information about the XEmacs-Beta