From: Gerd Moellmann Date: Tue, 17 Oct 2000 19:32:44 +0000 (+0000) Subject: (try_cursor_movement): Use cursor_row_p also when X-Git-Tag: emacs-pretest-21.0.90~797 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68c5d1db4a686dcd6d50ba98f46b19edd48cb48a;p=emacs.git (try_cursor_movement): Use cursor_row_p also when PT has moved backward. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4c8271bc7cb..06cc70af5c9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2000-10-17 Gerd Moellmann + * xdisp.c (try_cursor_movement): Use cursor_row_p also when + PT has moved backward. + * xdisp.c (cursor_row_p): Take continued lines into account. * alloc.c (mark_object) [GC_CHECK_STRING_BYTES]: Check validity of diff --git a/src/xdisp.c b/src/xdisp.c index bc6a7ebd714..12574dd5d07 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8958,12 +8958,12 @@ try_cursor_movement (window, startp, scroll_step) if (rc == 0) { int scroll_p = 0; + int last_y = window_text_bottom_y (w) - this_scroll_margin; + if (PT > XFASTINT (w->last_point)) { /* Point has moved forward. */ - int last_y = window_text_bottom_y (w) - this_scroll_margin; - while (MATRIX_ROW_END_CHARPOS (row) < PT && MATRIX_ROW_BOTTOM_Y (row) < last_y) { @@ -9024,9 +9024,9 @@ try_cursor_movement (window, startp, scroll_step) /* Due to newlines in overlay strings, we may have to skip forward over overlay strings. */ - while (MATRIX_ROW_END_CHARPOS (row) == PT - && MATRIX_ROW_ENDS_IN_OVERLAY_STRING_P (row) - && !row->ends_at_zv_p) + while (MATRIX_ROW_BOTTOM_Y (row) < last_y + && MATRIX_ROW_END_CHARPOS (row) == PT + && !cursor_row_p (w, row)) ++row; /* If within the scroll margin, scroll. */