Subject: bug#26: Consistent underline face end of line to edge extension on X

From: David De La Harpe Golden <[email-masked]>
Date: Mon, 03 Mar 2008 03:25:13 +0000

Stefan Monnier wrote:

> I understand that in your case you use underline as a way to "draw
> a line" so you want the line to extend to the window-edge, but when the
> underline is really meant as "this text should be underlined", extending
> the underline to the window-edge is truly ugly.
> 

Well, as I can certainly see that side too. However, still a few things:

(i) N.B. Extension happens anyway, if the background happens to be
different to the frame background (and it always happens on terminals).
I suppose you could flip the issue and consider it a bug that that
extension happens, but:

(ii) In my typical uses of underline face it doesn't arise much, since
the newline itself has to be in underline face for the extension to
happen, whereas underlining tends to be word-by-word, and if it's not
word-by-word, it tends to be across word-space-word not across
word-newline-word. (even for M-o u underlining whole paragraphs, but
that depends on whether you're doing text+longlines (newline ending
paragraph like a wordprocessor) or text+auto-fill (newline ending line),
the former will be okay but the latter ugly).

i.e. in

hello
goodbye

hello\n would have to be underlined for extension to happen, not just
the hello and goodbye being underlined separately.

(iii) Perhaps what is really needed is an face attribute to say whether
extension should take place - similar could be useful for
region-highlighting too - that currently extends too, which some people
might also find ugly (I know it conveys useful information as to whether
the newline is included or not, but still, a kind of "truncated
extension" would also be possible, where a vertical bar in a different
color is drawn).