selectrum icon indicating copy to clipboard operation
selectrum copied to clipboard

Mouse face changes foreground on hover

Open clemera opened this issue 3 years ago • 5 comments

As reported by @haji-ali here:

But when I hover with the mouse, the foreground color changes depending on the foreground color of the character that the mouse was hovering before!

clemera avatar Mar 22 '21 16:03 clemera

Apologies, it turned out this is not a selectrum "issue".

Reading more about mouse-face, the face of a candidate is simply overridden when the mouse hovers over it including any segments that might have a different face. Hence why any forground colors are gone while a line is highlighted. The strange part is the fact that in my case the forground color of the highlighted candidate depends on the previously highlighted candidate; but this might be just be a bug in my setup.

haji-ali avatar Mar 22 '21 18:03 haji-ali

The strange part is the fact that in my case the forground color of the highlighted candidate depends on the previously highlighted candidate; but this might be just be a bug in my setup.

When I tried I had the same behavior. Might have something to do with using and overlay + the display property used by marginalia we had other display issues with this combination, too.

clemera avatar Mar 22 '21 18:03 clemera

From what I can tell, the issue has nothing to do with selectrum (as @haji-ali notes). Note that the same thing happens in an org-agenda view, e.g.: mouse-face simply overrides the foreground of the face on any item. See e.g.

image

vs.

image

(this is what happens when the mouse hovers over that item).

apc avatar Apr 19 '21 00:04 apc

Maybe someone should report it as a bug to emacs?

bdarcus avatar Apr 19 '21 01:04 bdarcus

Before opening a new issue, I figured I could ask here. Since there's this inconsistency (bug or not), would it be possible to make selectrum-current-candidate behave in the same way, i.e., to override the existing foreground? IMHO it's a nice thing to have nevertheless.

cyrus-and avatar Dec 07 '21 20:12 cyrus-and