Subject: Re: bug#39115: 26.3; eww consecutive links look like one link with mouse-over

From: Eli Zaretskii <[email-masked]>
Date: Wed, 22 Jan 2020 18:31:21 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Wed, 22 Jan 2020 16:16:05 +0100
> Cc: [email-masked]
> 
> I don't know how to fix it, though.  Is there a way to make two
> consecutive mouse-face regions not light up at the same time when the
> mouse pointer is over a part of one of the regions?

Not without changes to C-level code, no.  It currently traverses the
glyphs looking for the first one that doesn't have the mouse-face, so
if two stretches of text one after the other have that face, it won't
notice.

If there are brave souls who would like to try their teeth on this,
patches are welcome.  Keep in mind that the relevant code solves the
very non-trivial problem of highlighting reordered bidirectional text,
so any algorithm that needs to rely on buffer positions linearly
increasing with glyph positions on the screen will fail.  The relevant
code is in mouse_face_from_buffer_pos and its subroutine
rows_from_pos_range; see also coords_in_mouse_face_p.