]> git.eshelyaron.com Git - emacs.git/commitdiff
(redisplay_window): Only try to make cursor line fully
authorKim F. Storm <storm@cua.dk>
Mon, 24 Jan 2005 13:22:07 +0000 (13:22 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 24 Jan 2005 13:22:07 +0000 (13:22 +0000)
visible once (to avoid redisplay loop).

src/ChangeLog
src/xdisp.c

index 3dc45c96ef54e641e229c369e3d6bb456adeef81..f2678e68ef56cc5eea7027237e70dbd7548ef609 100644 (file)
@@ -1,5 +1,10 @@
 2005-01-24  Kim F. Storm  <storm@cua.dk>
 
+       * window.c (window_scroll_pixel_based): Fix scrolling in the wrong
+       direction if window height was smaller than next-screen-context-lines.
+       Now always scroll at least one line in the requested direction.
+       Ensure that we actually do scroll backwards when requested to do so.
+
        * xdisp.c (redisplay_window): Only try to make cursor line fully
        visible once (to avoid redisplay loop).
 
index f1877c494cbd197b9e2bca9821c54aadd764ad4f..afcc4844ab26caa1fdd5e4764de1c5b74602a364 100644 (file)
@@ -12231,6 +12231,8 @@ redisplay_window (window, just_this_one_p)
       /* If centering point failed to make the whole line visible,
         put point at the top instead.  That has to make the whole line
         visible, if it can be done.  */
+      if (centering_position == 0)
+       goto done;
       clear_glyph_matrix (w->desired_matrix);
       centering_position = 0;
       goto point_at_top;