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
Shrink helm-candidate-separator
#1790
Comments
Pierre Neidhardt <notifications@github.com> writes:
Some commands like helm-show-kill-ring or helm-*-history use the helm-candidate-separator.
I suppose the purpose for having a separator is that entries might span over several lines.
The separator occupies about half the vertical space of the helm buffer. I'd rather save that, especially on <1080p screens.
Is it possible to shrink the line down to just a few pixel high?
AFAIK no, see (info "(elisp) line height").
Thanks.
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
Hmmm... Annoying. Another suggestion: what about removing the separator and alternating the background color of the entries instead? |
Pierre Neidhardt <notifications@github.com> writes:
Hmmm... Annoying.
Another suggestion: what about removing the separator and alternating
the background color of the entries instead?
This would require a complete rewrite of the multiline implementation,
something I don't want to do.
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
Maybe I could give it a try. Would you consider a PR then? |
No need to ask to put up a PR; go for it! 👍 |
Depends: It's a waste to work on a PR if the maintainer won't accept it because he/she does not like the feature... ;) |
Pierre Neidhardt <notifications@github.com> writes:
Depends: It's a waste to work on a PR if the maintainer won't accept
it because he/she does not like the feature... ;)
I never said I don't like the feature, I said it is not trivial and a
lot of work for the few benefit it provides.
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
I think the benefit is significant on small screens. |
Pierre Neidhardt <notifications@github.com> writes:
Maybe I could give it a try. Would you consider a PR then?
Depend how you plan to implement this.
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
Pierre Neidhardt <notifications@github.com> writes:
I think the benefit is significant on small screens.
I was simply asking for confirmation. Very well, I'll see what I can do.
I have pushed a branch 'multiline_candidates' which may help you
acheving this (It is far from perfect and may contain many bugs).
Actually selection assume candidate is a single line candidate when
multiline is not specified, this branch tries to fix this.
Try this example with master and multiline_candidates branch to see what
I mean:
(helm :sources (helm-build-sync-source "test"
:candidates '("foo\nbar" "baz\nfoo" "zoo\nzar"))
:buffer "*helm test*")
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
Thanks, I'll look into it. |
Pierre Neidhardt <notifications@github.com> writes:
Thanks, I'll look into it.
Now from the multiline_candidates branch you can do something like this:
(defun helm-test-transformer (candidates _source)
(cl-loop for c in candidates
for count from 1
if (cl-oddp count)
do (add-face-text-property 0 (length c) '((:background "DeepSkyBlue")) t c)
else
do (add-face-text-property 0 (length c) '((:background "LightSalmon")) t c)
finally return candidates))
(helm :sources (helm-build-sync-source "test"
:candidates '("foo\nbar" "baz\nfoo" "zoo\nzar" "bar\nfoo")
:filtered-candidate-transformer 'helm-test-transformer
)
:buffer "*helm test*")
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
If one wants to implement this, he have to start with the "fix_multiline" branch and fix it first because it have some issues (make a PR on it), then implementing the alternate BG display is quite easy. |
What do you mean, "not as nice"? |
Pierre Neidhardt <notifications@github.com> writes:
What do you mean, "not as nice"?
Switch to fix_multiline branch, write your code to have alternate BG's,
try it and make your own idea of this.
It will save a lot of screen space, that's the big plus I can see there.
As I said the "big plus" is not so big compared to the big amount of
work and the bugs it introduces to enable this, so if you think it's
worth the effort go ahead and write a PR.
Thanks.
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
At last, back to work! See #1888 for a first draft. |
Some commands like
helm-show-kill-ring
orhelm-*-history
use thehelm-candidate-separator
.I suppose the purpose for having a separator is that entries might span over several lines.
The separator occupies about half the vertical space of the helm buffer. I'd rather save that, especially on <1080p screens.
Is it possible to shrink the line down to just a few pixel high?
The text was updated successfully, but these errors were encountered: