From: Eli Zaretskii Date: Wed, 24 Jul 2013 17:36:42 +0000 (+0300) Subject: Fix bug #14780 with unreachable lines near end of buffer. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1702 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=999c74e390182b2dc303c8655c505c92c4a7deda;p=emacs.git Fix bug #14780 with unreachable lines near end of buffer. src/xdisp.c (redisplay_window): Instead of moving point out of scroll margin, reject the force_start method, and try scrolling. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2f04edc9bec..64b13a5ac28 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-07-24 Eli Zaretskii + + * 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 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined diff --git a/src/xdisp.c b/src/xdisp.c index 1a7369d7a45..1da7de5759c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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; + } } }