(x_draw_phys_cursor_glyph): Take into account that a box
authorGerd Moellmann <gerd@gnu.org>
Thu, 25 Apr 2002 17:28:08 +0000 (17:28 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 25 Apr 2002 17:28:08 +0000 (17:28 +0000)
cursor on a stretch glyph has a width that depends on
x_stretch_cursor_p.

src/ChangeLog
src/xterm.c

index 5a7dc54..686c19c 100644 (file)
@@ -1,3 +1,9 @@
+2002-04-25  Gerd Moellmann  <gerd@gnu.org>
+
+       * xterm.c (x_draw_phys_cursor_glyph): Take into account that a box
+       cursor on a stretch glyph has a width that depends on
+       x_stretch_cursor_p.
+
 2002-04-25  Pavel Jan\e,Bm\e(Bk  <Pavel@Janik.cz>
 
        * indent.c (Fvertical_motion): Fix last change.
index 0009161..1f9e863 100644 (file)
@@ -11478,7 +11478,13 @@ x_draw_phys_cursor_glyph (w, row, hl)
        {
          struct glyph *cursor_glyph = get_phys_cursor_glyph (w);
          if (cursor_glyph)
-           w->phys_cursor_width = cursor_glyph->pixel_width;
+           {
+             if (x_stretch_cursor_p)
+               w->phys_cursor_width = cursor_glyph->pixel_width;
+             else
+               w->phys_cursor_width = min (CANON_X_UNIT (XFRAME (w->frame)),
+                                           cursor_glyph->pixel_width);
+           }
        }
 
       /* When we erase the cursor, and ROW is overlapped by other