changeset 55128:535ccf62b57f

(x_draw_hollow_cursor): Fix height of box for narrow lines.
author Kim F. Storm <storm@cua.dk>
date Sat, 24 Apr 2004 23:42:26 +0000
parents 598e9ab0f662
children 3d63e56c74bc
files src/macterm.c src/xterm.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/macterm.c	Sat Apr 24 23:30:05 2004 +0000
+++ b/src/macterm.c	Sat Apr 24 23:42:26 2004 +0000
@@ -4665,7 +4665,8 @@
   /* Compute the proper height and ascent of the rectangle, based
      on the actual glyph.  Using the full height of the row looks
      bad when there are tall images on that row.  */
-  h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent);
+  h = max (min (FRAME_LINE_HEIGHT (f), row->height),
+	   cursor_glyph->ascent + cursor_glyph->descent);
   if (h < row->height)
     y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h;
   h--;
--- a/src/xterm.c	Sat Apr 24 23:30:05 2004 +0000
+++ b/src/xterm.c	Sat Apr 24 23:42:26 2004 +0000
@@ -7258,7 +7258,8 @@
   /* Compute the proper height and ascent of the rectangle, based
      on the actual glyph.  Using the full height of the row looks
      bad when there are tall images on that row.  */
-  h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent);
+  h = max (min (FRAME_LINE_HEIGHT (f), row->height),
+	   cursor_glyph->ascent + cursor_glyph->descent);
   if (h < row->height)
     y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h;
   h--;