From: Gerd Moellmann Date: Wed, 20 Dec 2000 14:25:09 +0000 (+0000) Subject: (try_cursor_movement): Fix last change. The real X-Git-Tag: emacs-pretest-21.0.95~380 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8de4aaf863f5796d7ab54a478a58cf3ff069e0cb;p=emacs.git (try_cursor_movement): Fix last change. The real condition is that PT is at the end of the row, and should be displayed at the start of the next row. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6814ea02fbf..83e83509c4d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2000-12-20 Gerd Moellmann + * xdisp.c (try_cursor_movement): Fix last change. The real + condition is that PT is at the end of the row, and should + be displayed at the start of the next row. + * xdisp.c (try_cursor_movement): If we end on a partially visible line, end we already decided to scroll, return -1. diff --git a/src/xdisp.c b/src/xdisp.c index 8a9e063ce1c..e72ca02e6e6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9332,13 +9332,16 @@ try_cursor_movement (window, startp, scroll_step) } else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row)) { - /* If we end up in a partially visible line, let's make it - fully visible, except when it's taller than the window, - in which case we can't do much about it. */ - if (scroll_p) + if (PT == MATRIX_ROW_END_CHARPOS (row) + && !row->ends_at_zv_p + && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)) rc = -1; else if (row->height > window_box_height (w)) { + /* If we end up in a partially visible line, let's + make it fully visible, except when it's taller + than the window, in which case we can't do much + about it. */ *scroll_step = 1; rc = -1; }