On 02/03/2008, David De La Harpe Golden wrote: > Working on that, noticed a difference between underlining on X and in > terminals: if a face has only underline set on a terminal and the > overlay with that face passes the narrower-than-window-width line end, > then the underline extends to the right edge of the window - in this > case desirable to get a line all the way across the window. > > If a face has only underline set on X, that doesn't happen, > only happens if the face also has a different background set to the > frame background. > > Not really up to speed on the C code, but I guess to fix the issue > xdisp.c/extend_face_to_end_of_line() probably just needs a small > change to extend if underline is set, not just boxes, different > backgrounds and stipples. > Anyhow, attached trivial patch fixes issue (and for overline and strikethrough too), assuming it is an issue. Note that the underline/overline was always drawn to edge if the background happened to be different, so this only changes the behaviour from existing behaviour when the face background is unset or happens to match the frame background. As such, it improves consistency IMO. strikethrough is a slightly different matter - unlike underline/overline it was using the width not the background_width when drawn, but for consistency it probably should use the same.