comparison src/xdisp.c @ 30761:8218291cc912

(try_cursor_movement): Fix handling of cursor in partially visible line which is smaller than the window's height.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 11 Aug 2000 13:00:43 +0000
parents 6c7afd50ec6a
children 8f6621d33f0b
comparison
equal deleted inserted replaced
30760:c5077abd4ef2 30761:8218291cc912
8948 || PT > MATRIX_ROW_END_CHARPOS (row)) 8948 || PT > MATRIX_ROW_END_CHARPOS (row))
8949 { 8949 {
8950 /* if PT is not in the glyph row, give up. */ 8950 /* if PT is not in the glyph row, give up. */
8951 rc = -1; 8951 rc = -1;
8952 } 8952 }
8953 else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row) 8953 else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row))
8954 && window_box_height (w) > row->height)
8955 { 8954 {
8956 /* If we end up in a partially visible line, let's make it 8955 /* If we end up in a partially visible line, let's make it
8957 fully visible, except when it's taller than the window, 8956 fully visible, except when it's taller than the window,
8958 in which case we can't do much about it. */ 8957 in which case we can't do much about it. */
8959 *scroll_step = 1; 8958 if (row->height > window_box_height (w))
8960 rc = -1; 8959 {
8960 *scroll_step = 1;
8961 rc = -1;
8962 }
8963 else
8964 {
8965 set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
8966 try_window (window, startp);
8967 make_cursor_line_fully_visible (w);
8968 rc = 1;
8969 }
8961 } 8970 }
8962 else if (scroll_p) 8971 else if (scroll_p)
8963 rc = -1; 8972 rc = -1;
8964 else 8973 else
8965 { 8974 {