sebastiencs / company-box

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

Respect company-tooltip-width-grow-only #189

Closed leodag closed 1 year ago

leodag commented 2 years ago

Just recreating #142 to use a different branch on my repository, so that I can keep messing with my master branch without it getting into the PR.

By the way, I've been using this patch (and have rebased through a few updates) with zero issues (with the potion both on and off) since the last PR.

142's text:

Just updated and found out we now check company-tooltip-width-grow-only instead of having its own variable, so I had the idea of implementing this, since it looked pretty easy.

Maybe not the most elegant solution (setting the frame width on company-box-show especially), and was made pretty fast, so if you'd like to see any modifications, please do say so!

sebastiencs commented 1 year ago

Hi @leodag , thanks for the PR !

setting the frame width on company-box-show especially

I'm not sure I understand why do we need this, could you please explain ?

The rest of the PR, respecting company-tooltip-width-grow-only, looks good

leodag commented 1 year ago

I'm not sure I understand why do we need this, could you please explain ?

This makes it so that the width never shrinks while the tooltip is open, but can shrink between different completions. This mirrors the behavior of company itself, and makes sense IMO since otherwise I'd just set min-width and max-width to be the same.

leodag commented 1 year ago

Sorry for the late response, I've pushed the requested changes just now. I've also confirmed they do work as expected.

sebastiencs commented 1 year ago

@leodag Thanks