aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-08-07 01:54:06 +0000
committerChong Yidong2008-08-07 01:54:06 +0000
commitc6aecbbd026dbdf263b2da00b4f351556bbd8042 (patch)
treeed13571352b5bc77b85fafa10919ae083a610f6b
parent709fc721684410ca0bf047846d4c3b657c541c8e (diff)
downloademacs-c6aecbbd026dbdf263b2da00b4f351556bbd8042.tar.gz
emacs-c6aecbbd026dbdf263b2da00b4f351556bbd8042.zip
(redisplay_window): Revert last change.
(try_window): Check bottom scroll margin too.
-rw-r--r--src/xdisp.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 4c099653a6d..920e7c1d34e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13668,11 +13668,6 @@ redisplay_window (window, just_this_one_p)
13668 debug_method_add (w, "same window start"); 13668 debug_method_add (w, "same window start");
13669#endif 13669#endif
13670 13670
13671 /* If there's a scroll margin, we must try to scroll, in case
13672 point is now in the scroll margin. */
13673 if (scroll_margin > 0)
13674 goto try_to_scroll;
13675
13676 /* Try to redisplay starting at same place as before. 13671 /* Try to redisplay starting at same place as before.
13677 If point has not moved off frame, accept the results. */ 13672 If point has not moved off frame, accept the results. */
13678 if (!current_matrix_up_to_date_p 13673 if (!current_matrix_up_to_date_p
@@ -14079,9 +14074,13 @@ try_window (window, pos, check_margins)
14079 { 14074 {
14080 int this_scroll_margin; 14075 int this_scroll_margin;
14081 14076
14082 this_scroll_margin = max (0, scroll_margin); 14077 if (scroll_margin > 0)
14083 this_scroll_margin = min (this_scroll_margin, WINDOW_TOTAL_LINES (w) / 4); 14078 {
14084 this_scroll_margin *= FRAME_LINE_HEIGHT (it.f); 14079 this_scroll_margin = min (scroll_margin, WINDOW_TOTAL_LINES (w) / 4);
14080 this_scroll_margin *= FRAME_LINE_HEIGHT (f);
14081 }
14082 else
14083 this_scroll_margin = 0;
14085 14084
14086 if ((w->cursor.y >= 0 /* not vscrolled */ 14085 if ((w->cursor.y >= 0 /* not vscrolled */
14087 && w->cursor.y < this_scroll_margin 14086 && w->cursor.y < this_scroll_margin
@@ -14091,7 +14090,7 @@ try_window (window, pos, check_margins)
14091 seems to give wrong results. We don't want to recenter 14090 seems to give wrong results. We don't want to recenter
14092 when the last line is partly visible, we want to allow 14091 when the last line is partly visible, we want to allow
14093 that case to be handled in the usual way. */ 14092 that case to be handled in the usual way. */
14094 || (w->cursor.y + 1) > it.last_visible_y) 14093 || w->cursor.y > it.last_visible_y - this_scroll_margin - 1)
14095 { 14094 {
14096 w->cursor.vpos = -1; 14095 w->cursor.vpos = -1;
14097 clear_glyph_matrix (w->desired_matrix); 14096 clear_glyph_matrix (w->desired_matrix);