[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 17:39:22 +0300 |
> Cc: drew.adams@oracle.com, 4911@debbugs.gnu.org, larsi@gnus.org
> From: Clément Pit-Claudel <clement.pitclaudel@gmail.com>
> Date: Mon, 4 May 2020 11:16:05 -0400
>
> 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.
I'm not sure I understand what you mean by "span" in general and
"current span" in particular.
We could, of course, realize such combinations. It would need:
. realizing and caching 2 faces whenever we render some text which
has a mouse-face property;
. recording the buffer positions to which those realized mouse-faces
are relevant; and
. 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)