1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-28 10:51:29 -08:00

(x_draw_glyph_string): Be sure to draw underline within the current

line area.
This commit is contained in:
Kenichi Handa 2008-05-23 06:11:53 +00:00
parent 90dc78a36e
commit efdf1b43d7

View file

@ -2909,6 +2909,12 @@ x_draw_glyph_string (s)
position = (s->font->descent + 1) / 2;
}
}
/* Check the sanity of thickness and position. We should
avoid drawing underline out of the current line area. */
if (s->y + s->height <= s->ybase + position)
position = s->y + s->height - 1;
if (s->y + s->height < s->ybase + position + thickness)
thickness = (s->y + s->height) - (s->ybase + position);
s->underline_thickness = thickness;
s->underline_position =position;
y = s->ybase + position;