sebastiencs / company-box

A company front-end with icons
561 stars 64 forks source link

Last candidate cut out of the frame #138

Open laynor opened 3 years ago

laynor commented 3 years ago

Wanna thank you first for your extension, really liking it so far!

I've got a small issue - when selecting the last candidate, instead of scrolling down to show the last line, the list of candidates scrolls up, so neither the last nor the second last line are shown anymore.

The gif I recorded is not the best - After to_owned is selected, I select to_string, which comes right after and is the last candidate. As you can see, instead of to_string appearing in the candidate list, to_owned disappears and no selected candidate is visible anymore. Peek 2020-11-02 19-55

rstcruzo commented 3 years ago

@laynor I am seeing this too. It's pretty annoying, did you manage to find a workaround?

rstcruzo commented 3 years ago

In my case this was caused by changing line-spacing to something bigger than default. It would be nice to be able to change line spacing without breaking company-box though

laynor commented 3 years ago

I still have the issue with company-box-icons-alist set to all-the-icons. Switching to image solves the issue for me. It might be some issue with my fonts, or anyway, non-constant font height. Some lines appeared taller than most (I think the ones with the cube icon). @rstcruzo Thanks for pointing me in the right direction with your last comment, although a different issue, it made me focus on line height.

AlonTzarafi commented 2 years ago

In my case this was caused by changing line-spacing to something bigger than default. It would be nice to be able to change line spacing without breaking company-box though

If you want both company-box and line-spacing it's possible. As long as you use (setq-default line-spacing 0), Then you can still call (setq line-spacing 0.2) on individual buffers to customize the look and company-box still works correctly and shows the last candidate.