unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ergus <spacibba@aol.com>
Cc: emacs-devel@gnu.org
Subject: Re: Merging the underline attribute at EOL
Date: Mon, 16 Dec 2019 18:17:36 +0200	[thread overview]
Message-ID: <83zhfs453z.fsf@gnu.org> (raw)
In-Reply-To: <20191216034901.amvufpomffmjaivy@Ergus> (message from Ergus on Mon, 16 Dec 2019 04:49:01 +0100)

> Date: Mon, 16 Dec 2019 04:49:01 +0100
> From: Ergus <spacibba@aol.com>
> Cc: emacs-devel@gnu.org
> 
> Actually this seems to be related with the face merge we do latter to
> fill the space until the window edge and how we calculate
> extend_face_id.
> 
> It is taking the text-properties in the call to face_at_pos just before
> the condition you mention.

Yes.  there's no problem with the face calculation in face_at_pos.
The problem is that under some conditions we decide to return early
from this function, and thus don't extend the face computed by
face_at_pos.

> So the problem seems to be in face_at_buffer_position in these lines:
> 
>    /* Merge in attributes specified via text properties.  */
>    if (!NILP (prop))
>      merge_face_ref (w, f, prop, attrs, true, NULL, attr_filter);
> 
> So maybe that is the condition we need to extend...
> 
> As a dumb test I just did:
> 
> if (!NILP (prop) && attr_filter > 0)
>      merge_face_ref (w, f, prop, attrs, true, NULL, attr_filter);

When we call face_at_buffer_position from extend_face_to_end_of_line,
attr_filter is always non-zero, so I cannot see how this could change
anything.

> And it seems to solve this specific issue (in tui and gui)... but it is
> inconsistent and I am not aware of the possible side effects...
> 
> Or probably we must fix this inside merge_face_ref. What do you think?

I don't think the problem is in face_at_pos.  The problem is that
after we compute the face for extending, we don't apply it, but
instead return, because neither the background color nor the box
attribute tell us to continue with what the function does afterwards.



  reply	other threads:[~2019-12-16 16:17 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 [this message]
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
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=83zhfs453z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=spacibba@aol.com \
    /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).