# HG changeset patch # User Kim F. Storm # Date 1082850146 0 # Node ID 535ccf62b57fa7909ffd1d00d04b2d7a034811b9 # Parent 598e9ab0f662e008c98b17c80c52e5d7f3d73729 (x_draw_hollow_cursor): Fix height of box for narrow lines. diff -r 598e9ab0f662 -r 535ccf62b57f src/macterm.c --- 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--; diff -r 598e9ab0f662 -r 535ccf62b57f src/xterm.c --- 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--;