Subject: Re: Mouse highlighting bug
From: Chong Yidong <[email-masked]>
To: [email-masked]
Date: Sun, 21 Jun 2009 22:03:37 -0400

> (global-set-key [f1]
>   (lambda () (interactive)
>     (switch-to-buffer "asdf")
>     (erase-buffer)
>     (insert "123456\n890")
>     (put-text-property 4 9 'mouse-face 'highlight)
>     (put-text-property 4 9 'face (list :underline t))))
>
> Put the mouse over the region with mouse-highlight, then remove it.
> Result: the space after the first line becomes underlined.

I've checked a fix for this into the trunk, which involves changing
x_draw_glyph_string so that the underline (and overline) is not extended
into the end-of-line padding.  This is similar to the behavior of
strike-through.