Fix bug #6671 with recentering and other scrolling problems.
authorEli Zaretskii <eliz@gnu.org>
Thu, 31 Mar 2011 19:12:30 +0000 (21:12 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 31 Mar 2011 19:12:30 +0000 (21:12 +0200)
commit63696a737c9c28f203e1e4f8c73f8a765486543f
tree52953c1f938dc657c5bc4023df7efcb6f58721b5
parentc82b2579f0d0abc7cfe75f9f29bc2c7010473878
parent09725d2628e9b8a796d128d24e7255a57c2424f3
Fix bug #6671 with recentering and other scrolling problems.

 src/xdisp.c (SCROLL_LIMIT): New macro.
 (try_scrolling): Use it when setting scroll_limit.  Limit
 scrolling to 100 screen lines.
 (redisplay_window): Even when falling back on "recentering",
 position point in the window according to scroll-conservatively,
 scroll-margin, and scroll-*-aggressively variables.
 (try_scrolling): When point is above the window, allow searching
 as far as scroll_max, or one screenful, to compute vertical
 distance from PT to the scroll margin position.  This prevents
 try_scrolling from unnecessarily failing when
 scroll-conservatively is set to a value slightly larger than the
 window height.  Clean up the case of PT below the margin at bottom
 of window: scroll_max can no longer be INT_MAX.  When aggressive
 scrolling is in use, don't let point enter the opposite scroll
 margin as result of the scroll.
 (syms_of_xdisp) <scroll-conservatively>: Document the
 threshold of 100 lines for never-recentering scrolling.

 doc/emacs/display.texi (Auto Scrolling): Document the limit of 100 lines
 for never-recentering scrolling with `scroll-conservatively'.
src/ChangeLog
src/xdisp.c