]> code.delx.au - gnu-emacs/commitdiff
(erase_phys_cursor): Adjust cursor row visible height.
authorKim F. Storm <storm@cua.dk>
Wed, 17 Nov 2004 00:27:37 +0000 (00:27 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 17 Nov 2004 00:27:37 +0000 (00:27 +0000)
src/xdisp.c

index 2620485bbe3da353f61d16a120b2f83c7a113dbd..2a9f3b6cd145e19cec6f2762d83111c49bb94856 100644 (file)
@@ -20068,6 +20068,11 @@ erase_phys_cursor (w)
   if (!cursor_row->enabled_p)
     goto mark_cursor_off;
 
+  /* If line spacing is > 0, old cursor may only be partially visible in
+     window after split-window.  So adjust visible height.  */
+  cursor_row->visible_height = min (cursor_row->visible_height,
+                                   window_text_bottom_y (w) - cursor_row->y);
+
   /* If row is completely invisible, don't attempt to delete a cursor which
      isn't there.  This can happen if cursor is at top of a window, and
      we switch to a buffer with a header line in that window.  */