company-box
company-box copied to clipboard
Take line-spacing into account when calculating height
The frame height is calculated in company-box--set-frame-position
as the character height in pixels multiplied by the number of items. The character height does not include line-spacing
; this causes the calculated height to be too small.
This PR adds handling of possible non-nil line-spacing
values.
Additionally/alternatively, it would be nice if company-box--render-buffer
called a hook at the end, so that the user could set line-spacing
to nil
specifically for the company-box buffer.
I applied your patch in my branch, but still not fix this issue. Here is my screenshot:
@stardiviner Are you sure you don’t have a stale .elc lying somewhere around?
After testing out, I found this line-space wrong issue is caused by icons which from all-the-icons
. If this patch can fit to all-the-icons line space or I have to disable icons.
Icons are a different issue. Feel free to take it.
Any idea to calculate the icon height? I want to take a try to add patch. @yurikhan
I think its better to leave the calculation here naive and create hooks, that allow manual repositioning of the frame. This way it will be working properly with the defaults as well as allow further compatibility changes
i.e. if you are in emacs27 you'll have an issue with the new tab-line mode, where the company-box position will be completely broken :\