unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: hugo@heagren.com
Cc: emacs-devel@gnu.org
Subject: Re: Highlighting discontinuous spans of text on mouseover
Date: Thu, 11 Apr 2024 13:56:06 +0300	[thread overview]
Message-ID: <86v84otbg9.fsf@gnu.org> (raw)
In-Reply-To: <d51f3bf89f7943ab83936c5a636f74d9@heagren.com> (hugo@heagren.com)

> Date: Thu, 11 Apr 2024 09:21:02 +0100
> From: hugo@heagren.com
> 
> Now my problem: For reasons made clear in the spec, any two links in
> the same terminal buffer with the same id param /and/ uri must be
> highlighted together, regardless of whether the text of the two links
> is continuous. So if there are two, discontinuous links with the same
> uri and id, and I mouseover one, both should be highlighted. When I
> mouse off, neither should be highlighted. Thus they should appear to
> the user as one link (though discontinuous on the screen). Just using
> buttons and mouse-face doesn't handle this. *Is there a
> standard/expected way to do this?*

The Emacs display engine supports mouse-highlight only of a single
contiguous portion of buffer text or string.  (The highlighted portion
can be non-contiguous on display due to bidi reordering, but it must
be contiguous in the order of the buffer or string positions.)
Supporting more than one highlighted portion would require changes of
the display code on the C level.



      reply	other threads:[~2024-04-11 10:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11  8:21 Highlighting discontinuous spans of text on mouseover hugo
2024-04-11 10:56 ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86v84otbg9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=hugo@heagren.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).