From: Kim F. Storm Date: Sat, 24 Apr 2004 23:42:26 +0000 (+0000) Subject: (x_draw_hollow_cursor): Fix height of box for narrow lines. X-Git-Tag: ttn-vms-21-2-B4~6611 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5970dbf71ed191b913bc95dec2c7534165d2bfb7;p=emacs.git (x_draw_hollow_cursor): Fix height of box for narrow lines. --- diff --git a/src/macterm.c b/src/macterm.c index dd5f2504032..fdb61249629 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -4665,7 +4665,8 @@ x_draw_hollow_cursor (w, row) /* 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 --git a/src/xterm.c b/src/xterm.c index bed9842fdc8..60ec7ec8830 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7258,7 +7258,8 @@ x_draw_hollow_cursor (w, row) /* 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--;