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
helm-ucs candidates wrap around #1365
Comments
Jorge Israel Peña notifications@github.com writes:
The aligment is calculated using the longest candidate. i.e: aa You don't see this longest candidate because of candidates-number-limit. Thierry |
Ah yes, that makes sense. Thanks for responding. I was previously using Is there perhaps any way to base the calculation off of the longest candidate within the currently shown candidates? That way this wrap around would only occur if this longest candidate shows up in the results? Or could we perhaps come up with some alternatives, even if opt-in? For example, perhaps an opt-in option to not right-align the character information, instead just indent it a bit? Actually, what if we show each candidate as the reverse of what it is now, this way we can quickly locate the characters at the beginning, and we can know where the name begins --- even if there is no alignment of the information, it is quickly identifiable and easy to locate:
I feel like this would be an amazing way to display it. Could we perhaps have an option for that? If not, could there be a way for me to set that for myself? Please? I would really really really appreciate it. |
I am working on this, will be ready soon. |
Wow, that's great to hear! I hadn't considered that idea. What approach are you taking for the wrapping issue? I'm liking the idea of showing the character first, instead of having to move my eyes to the right side of the screen, but I suppose as long as it stops wrapping I'll be content 😄 |
* helm-font.el (helm-ucs--max-len): (helm-calculate-ucs-max-len): Use maximize, return a cons cell for now. (helm-ucs-init): Fix calculation of length. (helm-ucs-insert): Fix regexp. (helm-ucs-insert-char): Reorder. (helm-ucs-insert-code): Reorder. (helm-ucs-insert-name): Reorder. (helm-source-ucs): Fix match-part.
* helm-font.el (helm-calculate-ucs-max-len): Do it. (helm-ucs-init): Do it.
* helm-font.el (helm-calculate-ucs-max-len): Do it. (helm-ucs-init): Apply it.
Alignment still not fully fixed. * helm-font.el (helm-calculate-ucs-max-len): Return again a cons. (helm-ucs-init): Change again alignment. (helm-ucs-insert): Fix regexp. (helm-ucs-insert-char): Use it. (helm-ucs-insert-code): Use it. (helm-ucs): Allow matching char at point.
* helm-font.el (helm-ucs): Check if char-after is non-nil.
* helm-font.el (helm-ucs-init): Do it. (helm-source-ucs): Use buffer-substring to get lines.
* helm-font.el (helm-ucs-insert): Do it.
* helm-font.el (helm-font): Group. (helm-ucs-char): Face. (helm-ucs-init): Use them.
* helm-font.el (helm-ucs-init): Only 2 fixed for now.
* helm-font.el (helm-ucs-init): Do it.
Showing the character first complicate matching, so it is now shown after the code and before the name. |
Cool thanks! The helm-ucs-char color you chose was hardly visible on my end, but I customized it 😄 |
My window width is 85 and as far as I have seen,
helm-ucs
is the only helm command where the candidates seem to wrap around unless I increase my window size to 96.I imagine this is because the characters are shown right-aligned, and perhaps some fixed-width is being used in the calculation for that alignment. Is there a way base it on the window width? Or at the very least customize the width used for the calculation?
The text was updated successfully, but these errors were encountered: