From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "David De La Harpe Golden" Newsgroups: gmane.emacs.devel Subject: Extending underline/overline/strikethrough to window edge on X Date: Sun, 2 Mar 2008 04:52:58 +0000 Message-ID: <8e24944a0803012052q7554670by36ccdacad35e88eb@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_20429_27853506.1204433578306" X-Trace: ger.gmane.org 1204433595 27822 80.91.229.12 (2 Mar 2008 04:53:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Mar 2008 04:53:15 +0000 (UTC) Cc: "Lennart Borgman \(gmail\)" , Tassilo Horn , David O'Toole , Stefan Monnier , emacs-devel@gnu.org To: "Miles Bader" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 02 05:53:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JVgCe-0002iF-JK for ged-emacs-devel@m.gmane.org; Sun, 02 Mar 2008 05:53:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVgC7-0006zr-UZ for ged-emacs-devel@m.gmane.org; Sat, 01 Mar 2008 23:53:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JVgC4-0006zf-Et for emacs-devel@gnu.org; Sat, 01 Mar 2008 23:53:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JVgC3-0006zS-Vy for emacs-devel@gnu.org; Sat, 01 Mar 2008 23:53:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVgC3-0006zP-Sy for emacs-devel@gnu.org; Sat, 01 Mar 2008 23:52:59 -0500 Original-Received: from wf-out-1314.google.com ([209.85.200.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JVgC3-0008FT-K4 for emacs-devel@gnu.org; Sat, 01 Mar 2008 23:52:59 -0500 Original-Received: by wf-out-1314.google.com with SMTP id 29so5692150wff.24 for ; Sat, 01 Mar 2008 20:52:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type; bh=47myFcKdaL2L9JUyJOP17QT0w8bTIFyxeSTZcSLSrko=; b=XNsxrQ47qE9Y+SmR5RFtjCTUJjPw5AD8K4YkW22Q9Pz9rLimCprJTXB1j/JWvyNruHgRTtK2YKWnwrn341guzPIeXXgKn0HjhOEMNvlThztf3KJTo6bXbK090/L91Xbrvqm3Mnhxkb18z2JO1I5Ad1H5EZCpvLqV0pGX1xtrfn0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type; b=MDBeQldrai35orSaJumIGfr5yhSCboIIYSKqhFz138lzcvL4QricTVxOCeAyAirDrP5gL274dNsllZSRTxO5QYF+rCp03jrywlDcHCi+rkz8V7tQyzjKv4AgHN77NgHOYi5S2VjXOiYxuBmg6VKxbH6HidmhNshp2dNR/h4v5p8= Original-Received: by 10.142.204.18 with SMTP id b18mr432949wfg.126.1204433578267; Sat, 01 Mar 2008 20:52:58 -0800 (PST) Original-Received: by 10.143.187.7 with HTTP; Sat, 1 Mar 2008 20:52:58 -0800 (PST) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91035 Archived-At: ------=_Part_20429_27853506.1204433578306 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. ------=_Part_20429_27853506.1204433578306 Content-Type: text/x-diff; name=xdisp_extend_underline_to_edge.diff Content-Transfer-Encoding: base64 X-Attachment-Id: f_fdb4kqhh Content-Disposition: attachment; filename=xdisp_extend_underline_to_edge.diff SW5kZXg6IHNyYy94ZGlzcC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9zb3VyY2VzL2VtYWNzL2Vt YWNzL3NyYy94ZGlzcC5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjExOTgKZGlmZiAtdSAtcjEu MTE5OCB4ZGlzcC5jCi0tLSBzcmMveGRpc3AuYwkyOSBGZWIgMjAwOCAwMzoxMjoyNyAtMDAwMAkx LjExOTgKKysrIHNyYy94ZGlzcC5jCTIgTWFyIDIwMDggMDQ6NDI6NDYgLTAwMDAKQEAgLTE1OTY4 LDYgKzE1OTY4LDkgQEAKICAgaWYgKEZSQU1FX1dJ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gsIGgpOwogCSAgICAgIFhTZXRGb3JlZ3JvdW5kIChzLT5kaXNwbGF5LCBzLT5nYywgeGdj di5mb3JlZ3JvdW5kKTsKIAkgICAgfQogCX0K ------=_Part_20429_27853506.1204433578306--