emacs-devel
[Top][All Lists]
Advanced

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

Re: Side effects in `tooltip-show'


From: Eli Zaretskii
Subject: Re: Side effects in `tooltip-show'
Date: Mon, 17 Jan 2022 14:41:49 +0200

> From: Po Lu <luangruo@yahoo.com>
> Date: Mon, 17 Jan 2022 09:30:16 +0800
> 
> I'd like to install a fix for a regression in the release branch: since
> `equal-including-properties' is used in Emac 28 to compare tooltip
> strings with their previous values, this branch in tooltip-show-help is
> never reached:
> 
>             ((equal-including-properties previous-help msg)
>              ;; Same help as before (but possibly the mouse has moved).
>              ;; Keep what we have.
>              )
> 
> Because tooltip-show mutates the text properties of any string passed to
> it.  This causes a lot of flicker when the mouse is moved around.
> 
> The fix is to copy the string passed to `tooltip-show' before modifying
> its text properties, like this:

I'm not happy about consing a new string each time we have a help-echo
event.  That'd definitely increase the GC pressure, which is
undesirable.

How about using 'equal' to compare the strings instead?  What are the
chances that two help-echo strings of 2 different tooltips will
compare equal without the properties, but not with the properties?



reply via email to

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