-
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
Create user option to highlight full candidate line. #208
Conversation
…ates-display-string. Replace sexp "(equal index highlighted-index)" with variable "formatting-current-candidate" in function "selectrum--candidates-display-string".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, seems great to me. I hadn't even thought about this, but it's a good option to have. Want to add a changelog entry for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, and we should also have something in the README since this is a public user option.
selectrum.el
Outdated
The default is to only highlight the displayed candidate text, | ||
though if the candidate has text displayed at the right margin, | ||
then the entire line will be highlighted anyway." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we shorten this to "The default is to only highlight the displayed text"? That would be a bit easier to read/understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I meant leaving off the ",though if..." part, too. I don't think it's needed because " The default is to only highlight the displayed text" should be sufficient. The "though if..." only describes a detail following from this statement, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
I was unsure about clarifying between a candidate's displayed text and the "not-annotation" part of the candidate, and between a line of text and the horizontal space on the screen in which the line of text is located. Similarly, should the variable's name be changed to clarify that it applies only to the current candidate, and not some other kind of formatting done to the other candidates? |
Hm, maybe |
…ndidate-highlight.
After thinking about it, I feel that Do you think that this extending should also happen for the input line? I originally only thought about the candidates, to not be obscured by the |
The new name seems fine to me, although maybe @clemera will have another suggestion. It seems to me like extending should probably happen for the input line as well, for consistency, unless that looks odd. |
I also like the new name! It feels natural to me that only the input gets selected, highlighting the input line would require changes to how we insert the overlay, but I leave that to @raxod502 to decide. |
I'm fine with doing it either way. |
Is there anything left you would like to add @okamsn? |
No, I am content with the current changes. Thank you. |
Thank you! I just noticed the dashes for the let bound variable names, which can lead to accidentally binding dynamic var names of other packages. But with the given names and the code within the let body a collision seems very unlikely so I think it's okay in this case. We can convert those cases at some later point throughout the whole package. |
Which variable names were you looking at here? |
|
Fair enough. I had never thought about it before, but it's true, that could happen. |
This really only makes a noticeable difference when there isn't text at the right margin, but I still find it helpful.
Should anything else be changed?