gaynor@porthos.rutgers.edu (Silver) (03/17/89)
... windows are the size of (1+ next-screen-context-lines), including
mode-line. In fact, when the window is smaller, the function moves negative
lines!
The code for the default scroll amount in scroll_command in window.c reads:
register int defalt
= direction * (window_height (selected_window) - 1
- next_screen_context_lines);
I think it should read something like:
/* Determine the magnitude of the normal scroll, then */
/* correct for small window glitch and set direction. */
register int defalt
= window_height(selected_window) - 1 - next_screen_context_lines;
defalt = direction * (defalt < 1 ? 1 : defalt);
This is untested in C, but worked fine as far as I could tell in a quick lisp
function. I corrected with 1, because it was the minimum, and it _smelled_
right. That's the place to build a nicer value, if you think it's necessary.
This simply corrects the error in the default value, so that it always does
*some* work in the right direction. Note that the same problem should exist
with scroll-down, and that this should fix that too. I dunno a damn thing
about scroll-left and scroll-right.
Sorry 'bout this, [Ag] gaynor@rutgers.edu