diff options
| author | Kenichi Handa | 2008-05-23 06:11:53 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-23 06:11:53 +0000 |
| commit | efdf1b43d7bb507aca5536ee1171bd1bf6cc32d5 (patch) | |
| tree | 698fba821b446bbe70f7d3775b0765738d608996 | |
| parent | 90dc78a36ea3c20e8c87b27f7d96b86262d292bb (diff) | |
| download | emacs-efdf1b43d7bb507aca5536ee1171bd1bf6cc32d5.tar.gz emacs-efdf1b43d7bb507aca5536ee1171bd1bf6cc32d5.zip | |
(x_draw_glyph_string): Be sure to draw underline within the current
line area.
| -rw-r--r-- | src/w32term.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/w32term.c b/src/w32term.c index eb45d30b54b..5f5a3f954a9 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2909,6 +2909,12 @@ x_draw_glyph_string (s) | |||
| 2909 | position = (s->font->descent + 1) / 2; | 2909 | position = (s->font->descent + 1) / 2; |
| 2910 | } | 2910 | } |
| 2911 | } | 2911 | } |
| 2912 | /* Check the sanity of thickness and position. We should | ||
| 2913 | avoid drawing underline out of the current line area. */ | ||
| 2914 | if (s->y + s->height <= s->ybase + position) | ||
| 2915 | position = s->y + s->height - 1; | ||
| 2916 | if (s->y + s->height < s->ybase + position + thickness) | ||
| 2917 | thickness = (s->y + s->height) - (s->ybase + position); | ||
| 2912 | s->underline_thickness = thickness; | 2918 | s->underline_thickness = thickness; |
| 2913 | s->underline_position =position; | 2919 | s->underline_position =position; |
| 2914 | y = s->ybase + position; | 2920 | y = s->ybase + position; |