unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <clement.pitclaudel@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 4911@debbugs.gnu.org
Subject: bug#4911: mouse-face property should merge face attributes, not replace
Date: Mon, 4 May 2020 11:16:05 -0400	[thread overview]
Message-ID: <dd1fba2d-4921-8f56-0f51-5ef276e32ec7@gmail.com> (raw)
In-Reply-To: <83blne74mk.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 1269 bytes --]

On 26/04/2020 09.34, Eli Zaretskii wrote:
> If someone wants to work on an option whereby we will merge the mouse
> face with the face of each highlighted character, that would be 
> welcome.  I just want to warn volunteers that providing such a 
> feature is not going to be simple: the way mouse-highlight is 
> currently implemented we simply redraw a stretch of glyphs on the 
> screen with a face that is already "realized" and cached (see 
> xfaces.c).  Which means face merging has been already done, and we 
> can only use the existing faces which were merged long ago.  Making 
> this new feature happen would then require reimplementing 
> mouse-highlight similar to the region (some kind of overlay)

Thanks a lot, this summary was very useful.
I've been pondering this issue since your last message, hoping to find a way to keep the complexity down and not introduce flickering.

Currently we cache a single realized mouse_face.  Could we cache a sequence of such realized faces instead, attached to regions of text?  That is, we'd compute the realized mouse-face for all regions of the current span, and cache that.  Concretely, I guess this would mean enhancing Mouse_HLInfo to keep a list of spans instead of a single one.

Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-05-04 15:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 12:41 bug#4911: mouse-face property should merge face attributes, not replace Dave Aspinall
2019-10-01 14:08 ` Lars Ingebrigtsen
2019-10-01 14:36   ` Basil L. Contovounesios
2019-10-01 15:00   ` Eli Zaretskii
2019-10-01 15:14     ` Lars Ingebrigtsen
2019-10-01 16:46   ` Drew Adams
2020-04-10 16:26 ` Clément Pit-Claudel
2020-04-25 21:22   ` Clément Pit-Claudel
2020-04-25 22:13     ` Drew Adams
2020-04-26  3:10       ` Clément Pit-Claudel
2020-04-26 13:34         ` Eli Zaretskii
2020-05-04 15:16           ` Clément Pit-Claudel [this message]
2020-05-08 14:39             ` Eli Zaretskii
2020-05-08 15:01               ` Clément Pit-Claudel
2020-05-08 15:20                 ` Eli Zaretskii
2020-05-08 15:58                   ` Clément Pit-Claudel
2020-04-26 17:22         ` Drew Adams

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=dd1fba2d-4921-8f56-0f51-5ef276e32ec7@gmail.com \
    --to=clement.pitclaudel@gmail.com \
    --cc=4911@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.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).