changeset 51537:112183232cf4

(phys_cursor_in_rect_p): Fix 2003-05-24 change. Adjust phys_cursor.x to be relative to window box, rather than text area before checking -- to ensure cursor is redrawn when exposing window. Note: This also fixes a similar (older) bug if display margins are present.
author Kim F. Storm <storm@cua.dk>
date Mon, 09 Jun 2003 23:01:52 +0000
parents e92c269c0cde
children 6b1db366479e
files src/xdisp.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Jun 09 23:01:17 2003 +0000
+++ b/src/xdisp.c	Mon Jun 09 23:01:52 2003 +0000
@@ -20186,7 +20186,9 @@
   cursor_glyph = get_phys_cursor_glyph (w);
   if (cursor_glyph)
     {
-      cr.x = w->phys_cursor.x;
+      /* r is relative to W's box, but w->phys_cursor.x is relative 
+	 to left edge of W's TEXT area.  Adjust it.  */
+      cr.x = window_box_left_offset (w, TEXT_AREA) + w->phys_cursor.x;
       cr.y = w->phys_cursor.y;
       cr.width = cursor_glyph->pixel_width;
       cr.height = w->phys_cursor_height;