From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: Side effects in `tooltip-show'
Date: Mon, 17 Jan 2022 14:41:49 +0200 [thread overview]
Message-ID: <83pmoqwn3m.fsf@gnu.org> (raw)
In-Reply-To: <87czkr87yv.fsf@yahoo.com> (message from Po Lu on Mon, 17 Jan 2022 09:30:16 +0800)
> 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?
next prev parent reply other threads:[~2022-01-17 12:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87czkr87yv.fsf.ref@yahoo.com>
2022-01-17 1:30 ` Side effects in `tooltip-show' Po Lu
2022-01-17 12:41 ` Eli Zaretskii [this message]
2022-01-17 13:00 ` Po Lu
2022-01-17 13:21 ` Eli Zaretskii
2022-01-17 13:29 ` Po Lu
2022-01-17 13:40 ` Eli Zaretskii
2022-01-17 13:41 ` Po Lu
2022-01-18 7:23 ` Pankaj Jangid
2022-01-18 7:55 ` Po Lu
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83pmoqwn3m.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.