-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlighting of selected candidate when using the display property #411
Comments
Thanks Omar, please see #235, I'm closing this, see there for more discussion. |
This comment in particular there was a lot of other discussion going on, as well. |
It seemed better to me to rename the other issue to keep track of the bleeding prompt issue mentioned there and making this one the canonical one for the display property problem now. |
Well, (defun ivy--add-face (str face)
"Propertize STR with FACE."
(let ((len (length str)))
(condition-case nil
(progn
(colir-blend-face-background 0 len face str)
(let ((foreground (face-foreground face)))
(when foreground
(add-face-text-property
0 len (list :foreground foreground) nil str))))
(error
(ignore-errors
(font-lock-append-text-property 0 len 'face face str)))))
str) |
It seems even replacing |
This is weird, I thought when I tested with (completing-read "Candidates: "
`(,(propertize "GNU" 'display "some-prefix: GNU")
,(propertize "Emacs" 'display "other-prefix: Emacs"))) |
I think the reason it works with |
I actually like it without the highlighting. I am only using 'display in consult where I am okay with no highlighting. In other cases I use 'invisible. |
I also think the line numbers in |
I will leave it as is then, the bleeding is fixed and the selection with |
Emacs bug report can be found here |
This is noticeable in
consult-line
, where the line numbers are not highlighted, or inembark-keymap-help
, where the keybindings are not highlighted. Ivy does highlight the whole thing including the parts in adisplay
text property, so it is at least possible.The text was updated successfully, but these errors were encountered: