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: Eli Zaretskii
Subject: bug#4911: mouse-face property should merge face attributes, not replace
Date: Fri, 08 May 2020 18:20:20 +0300

> Cc: drew.adams@oracle.com, 4911@debbugs.gnu.org, larsi@gnus.org
> From: Clément Pit-Claudel <clement.pitclaudel@gmail.com>
> Date: Fri, 8 May 2020 11:01:35 -0400
> 
> > I'm not sure I understand what you mean by "span" in general and
> > "current span" in particular.
> 
> I meant a range of text with a single mouse-face property.

But if the underlying text has different face properties, the range of
text should now be divided into different "spans", no?

> >   . realizing and caching 2 faces whenever we render some text which
> >     has a mouse-face property;
> 
> Don't we already do this, currently?

No, because we only have a single mouse-face.  With this feature, we'd
have multiple ones, and they are only known when the face of the text
is being realized, because each character could have different sources
of face information, which need to be merged.

> >   . recording the buffer positions to which those realized mouse-faces
> >     are relevant; and
> 
> That makes sense.  Basically, I was hoping to change Mouse_HLInfo to contain 
> more than one range and more than one face.

Maybe that, too, will have to be used.

> >   . using the corresponding face when redrawing the highlighted
> >     portions of text by looking at the positions of each of the
> >     affected glyphs (which might be complicated if the text doesn't
> >     come from a buffer)
> 
> But isn't that already taken care of by the existing highlighting code?

No, because the existing code always uses the same mouse-face.  So it
only needs to know which glyphs need to be redrawn with that single
face.





reply via email to

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