emacs-helm / helm

Emacs incremental completion and selection narrowing framework
https://emacs-helm.github.io/helm/
GNU General Public License v3.0
3.37k stars 389 forks source link

Face helm-selection does not apply to all marked candidates #784

Closed metaturso closed 9 years ago

metaturso commented 9 years ago

When marking candidates in Helm buffers, some candidates randomly ignore the background colour definition (helm-selection) while still getting underlined.

On the one hand this is an innocent issue but on the other hand it might become quite aggravating when themes disable text underlining on hover.

The animation below shows the issue reproduced on a vanilla GNU Emacs 24.4.50.1 with only Helm loaded:

This issue affects various versions of Helm, specifically I have reproduced it on v1.6.5 and 628ded4.

metaturso commented 9 years ago

For it matters, running ./emacs-helm.sh and evaluating (set-face-attribute 'helm-selection nil :background "red") is sufficient to reproduce the issue.

In particular the sequence of steps is:

  1. Open a *Helm Find Files* buffer with C-c C-f
  2. Mark some files with C-SPC
  3. Scroll through the candidates with C-n and C-p to see that some of them don't get highlighted correctly.
thierryvolpiatto commented 9 years ago

They are highlighted, but you can't see the color because it is under the marked candidates face, it is why I use by default underline, to be able to see the selection in such situation.

metaturso commented 9 years ago

So if i understand your comment you are saying that the helm-selection face is applied under helm-visible-mark, making the former invisible. Is that it?

I understand Emacs can not stack faces. In spite of this Helm is able to highlight candidates when they're marked and selected (as in hovered) but a few random ones.

FWIW, marking and unmarking repeatedly those candidates a few times will cause them to be coloured correctly. On 31 Dec 2014 09:47, "Thierry Volpiatto" notifications@github.com wrote:

They are highlighted, but you can't see the color because it is under the marked candidates face, it is why I use by default underline, to be able to see the selection in such situation.

— Reply to this email directly or view it on GitHub https://github.com/emacs-helm/helm/issues/784#issuecomment-68430371.

metaturso commented 9 years ago

Shouldn't there be a way in the Helm sources to control the order in which those two faces are applied to a candidate?

thierryvolpiatto commented 9 years ago

Andrea Turso notifications@github.com writes:

So if i understand your comment you are saying that the helm-selection face is applied under helm-visible-mark, making the former invisible. Is that it?

Yes the overlay is there but hidden by the other one.

I understand Emacs can not stack faces. In spite of this Helm is able to highlight candidates when they're marked and selected (as in hovered) but a few random ones.

Indeed.

FWIW, marking and unmarking repeatedly those candidates a few times will cause them to be coloured correctly.

Yes, thanks to show this, I will look into this as soon as possible.

Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997

thierryvolpiatto commented 9 years ago

Should be fixed now, sorry for the delay, feel free to reopen if something wrong. Thanks.