changeset 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 c5077abd4ef2
children c53170c88e0a
files src/xdisp.c
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Fri Aug 11 12:59:31 2000 +0000
+++ b/src/xdisp.c	Fri Aug 11 13:00:43 2000 +0000
@@ -8950,14 +8950,23 @@
 	      /* if PT is not in the glyph row, give up.  */
 	      rc = -1;
 	    }
-	  else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row)
-		   && window_box_height (w) > row->height)
+	  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.  */
-	      *scroll_step = 1;
-	      rc = -1;
+	      if (row->height > window_box_height (w))
+		{
+		  *scroll_step = 1;
+		  rc = -1;
+		}
+	      else
+		{
+		  set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
+		  try_window (window, startp);
+		  make_cursor_line_fully_visible (w);
+		  rc = 1;
+		}
 	    }
 	  else if (scroll_p)
 	    rc = -1;