aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-04-24 23:42:26 +0000
committerKim F. Storm2004-04-24 23:42:26 +0000
commit5970dbf71ed191b913bc95dec2c7534165d2bfb7 (patch)
tree14edb2eefa514f1d0bc2a6152a80447a1df0ab99
parentc3ea173da5f8718d9b2677915ee632b85e36f045 (diff)
downloademacs-5970dbf71ed191b913bc95dec2c7534165d2bfb7.tar.gz
emacs-5970dbf71ed191b913bc95dec2c7534165d2bfb7.zip
(x_draw_hollow_cursor): Fix height of box for narrow lines.
-rw-r--r--src/macterm.c3
-rw-r--r--src/xterm.c3
2 files changed, 4 insertions, 2 deletions
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)
4665 /* Compute the proper height and ascent of the rectangle, based 4665 /* Compute the proper height and ascent of the rectangle, based
4666 on the actual glyph. Using the full height of the row looks 4666 on the actual glyph. Using the full height of the row looks
4667 bad when there are tall images on that row. */ 4667 bad when there are tall images on that row. */
4668 h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent); 4668 h = max (min (FRAME_LINE_HEIGHT (f), row->height),
4669 cursor_glyph->ascent + cursor_glyph->descent);
4669 if (h < row->height) 4670 if (h < row->height)
4670 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; 4671 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h;
4671 h--; 4672 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)
7258 /* Compute the proper height and ascent of the rectangle, based 7258 /* Compute the proper height and ascent of the rectangle, based
7259 on the actual glyph. Using the full height of the row looks 7259 on the actual glyph. Using the full height of the row looks
7260 bad when there are tall images on that row. */ 7260 bad when there are tall images on that row. */
7261 h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent); 7261 h = max (min (FRAME_LINE_HEIGHT (f), row->height),
7262 cursor_glyph->ascent + cursor_glyph->descent);
7262 if (h < row->height) 7263 if (h < row->height)
7263 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; 7264 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h;
7264 h--; 7265 h--;