unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Merging the underline attribute at EOL
Date: Sun, 22 Dec 2019 23:46:39 +0100	[thread overview]
Message-ID: <20191222224639.rbeslrfnivhenciv@Ergus> (raw)
In-Reply-To: <83woas1g1g.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi:

Sorry for the big latency in my replies. Busy days.

>
>Mostly true (it could also be the "underlying" face when we render a
>display string).
>
You're right

>
>But if the default face has underline or overline or box etc.,
>attributes, we don't want to exit early, even though its background
>color is the default, right?
>
Then the simpler solution is the attached patch I have been using for
some days... It just extends the conditions in the if (as you suggested
since the beginning).

If it is fine for you, then you can commit the patch for me. Of just
tell me if there are more issues to fix.

Best,
Ergus

[-- Attachment #2: test.patch --]
[-- Type: text/plain, Size: 1333 bytes --]

diff --git a/src/xdisp.c b/src/xdisp.c
index 2dfc4cbfeb..f7d0df714f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21601,8 +21601,8 @@ extend_face_to_end_of_line (struct it *it)
      one extra blank where we could display the cursor.  */
   if ((it->current_x >= it->last_visible_x
        + (!FRAME_WINDOW_P (f)
-	  && it->glyph_row->reversed_p
-	  && !it->glyph_row->continued_p))
+          && it->glyph_row->reversed_p
+          && !it->glyph_row->continued_p))
       /* If the window has display margins, we will need to extend
 	 their face even if the text area is filled.  */
       && !(WINDOW_LEFT_MARGIN_WIDTH (it->w) > 0
@@ -21623,13 +21623,16 @@ extend_face_to_end_of_line (struct it *it)
 
   if (FRAME_WINDOW_P (f)
       && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row)
-      && face->box == FACE_NO_BOX
       && FACE_COLOR_TO_PIXEL (face->background, f) == FRAME_BACKGROUND_PIXEL (f)
 #ifdef HAVE_WINDOW_SYSTEM
       && !face->stipple
 #endif
       && !it->glyph_row->reversed_p
-      && !Vdisplay_fill_column_indicator)
+      && !Vdisplay_fill_column_indicator
+      && face->box == FACE_NO_BOX
+      && face->underline == FACE_NO_UNDERLINE
+      && face->overline_p == false
+      && face->strike_through_p == false)
     return;
 
   /* Set the glyph row flag indicating that the face of the last glyph

  reply	other threads:[~2019-12-22 22:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14  8:28 Merging the underline attribute at EOL Eli Zaretskii
2019-12-16  3:12 ` Ergus
2019-12-16 16:12   ` Eli Zaretskii
2019-12-16  3:49 ` Ergus
2019-12-16 16:17   ` Eli Zaretskii
2019-12-16 16:11 ` Ergus
2019-12-16 17:05   ` Eli Zaretskii
2019-12-16 20:31     ` Ergus
2019-12-17  3:22       ` Eli Zaretskii
2019-12-17 14:13         ` Ergus
2019-12-17 17:18           ` Eli Zaretskii
2019-12-19  1:19             ` Ergus
2019-12-19 15:38               ` Eli Zaretskii
2019-12-22 22:46                 ` Ergus [this message]
2019-12-23 13:35                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191222224639.rbeslrfnivhenciv@Ergus \
    --to=spacibba@aol.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).