]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #14780 with unreachable lines near end of buffer.
authorEli Zaretskii <eliz@gnu.org>
Wed, 24 Jul 2013 17:36:42 +0000 (20:36 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 24 Jul 2013 17:36:42 +0000 (20:36 +0300)
 src/xdisp.c (redisplay_window): Instead of moving point out of
 scroll margin, reject the force_start method, and try scrolling.

src/ChangeLog
src/xdisp.c

index 2f04edc9becd38b0b5518bb4137122aba1ba7732..64b13a5ac280c2cbeabf37151f5b29ffa2abea90 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-24  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (redisplay_window): Instead of moving point out of
+       scroll margin, reject the force_start method, and try scrolling
+       instead.  (Bug#14780)
+
 2013-07-24  Ken Brown  <kbrown@cornell.edu>
 
        * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
index 1a7369d7a45ef68e3edec16363b9b6ee35856779..1da7de5759c4d50f120900918549528202dc584a 100644 (file)
@@ -15608,10 +15608,11 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
             the Y coordinate of the _next_ row, see the definition of
             MATRIX_ROW_BOTTOM_Y.  */
          if (w->cursor.vpos < margin + header_line)
-           new_vpos
-             = pixel_margin + (header_line
-                               ? CURRENT_HEADER_LINE_HEIGHT (w)
-                               : 0) + frame_line_height;
+           {
+             w->cursor.vpos = -1;
+             clear_glyph_matrix (w->desired_matrix);
+             goto try_to_scroll;
+           }
          else
            {
              int window_height = window_box_height (w);
@@ -15619,7 +15620,11 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
              if (header_line)
                window_height += CURRENT_HEADER_LINE_HEIGHT (w);
              if (w->cursor.y >= window_height - pixel_margin)
-               new_vpos = window_height - pixel_margin;
+               {
+                 w->cursor.vpos = -1;
+                 clear_glyph_matrix (w->desired_matrix);
+                 goto try_to_scroll;
+               }
            }
        }