# HG changeset patch # User Chong Yidong # Date 1217976391 0 # Node ID 7623a8fa7f799af403026e508437538e38f8f49e # Parent 3d2552ae5c533f3339e5f756c1f1773f2dfa3d41 (redisplay_window): Don't enforce scroll-margin when forcing a window start. diff -r 3d2552ae5c53 -r 7623a8fa7f79 src/xdisp.c --- a/src/xdisp.c Tue Aug 05 22:46:07 2008 +0000 +++ b/src/xdisp.c Tue Aug 05 22:46:31 2008 +0000 @@ -13065,7 +13065,6 @@ { /* We set this later on if we have to adjust point. */ int new_vpos = -1; - int val; w->force_start = Qnil; w->vscroll = 0; @@ -13099,16 +13098,15 @@ /* Redisplay, then check if cursor has been set during the redisplay. Give up if new fonts were loaded. */ - val = try_window (window, startp, 1); - if (!val) + /* We used to issue a CHECK_MARGINS argument to try_window here, + but this causes scrolling to fail when point begins inside + the scroll margin (bug#148) -- cyd */ + if (!try_window (window, startp, 0)) { w->force_start = Qt; clear_glyph_matrix (w->desired_matrix); goto need_larger_matrices; } - /* Point was outside the scroll margins. */ - if (val < 0) - new_vpos = window_box_height (w) / 2; if (w->cursor.vpos < 0 && !w->frozen_window_start_p) {