bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4911: mouse-face property should merge face attributes, not replace


From: Clément Pit-Claudel
Subject: bug#4911: mouse-face property should merge face attributes, not replace
Date: Mon, 4 May 2020 11:16:05 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]