Closed Dr-Dd closed 4 years ago
This works, but not all the time. The problem is that, even though we are using propertized text, the pos relative to when the width/height exceeds the frame size is still related to the frame-char-size, and not the propertized text size. I don't know the logic well enough to rework this.
In the meantime i fixed #96. I'm gonna open another pull request with it, and i'm gonna rebranch this one.
I don't know if this is the correct way to solve this problem, but i implemented it in a way so that the spacing and the tooltip position remains correct
That was a good effort, but I'd need to see a more detailed description of the problem first.
As far as the change itself, I would probably be okay with it.
I'll try to iron out the aforementioned problems, then i'll send a pull request.
Any indication to how the quickhelp tooltip gets repositioned when the doc size is too wide or high for the buffer? That's the thing that i'm trying to fix, but i can't seem to find where this adjustment happens.
That probably happens in pos-tip
. We tell it to show a tooltip of width W at position X-Y, and it does its best.
I think that should be handled here instead, and the width we pass to pos-tip should be reduced when we know it can't fit in the current frame.
I don't know if this is the correct way to solve this problem, but i implemented it in a way so that the spacing and the tooltip position remains correct, also the option is available only if you set to true
company-quickhelp-use-propertized-text
. I implemented it as suggested bypos-tip-show-no-propertize
documentation. In theory if i understand correctlypos-tip
should have its own face namedpos-tip
, but at the moment it lacks such feature. If it existed, i would have put the createdcompany-quickhelp-face
to inherit frompos-tip
, instead of thetooltip
(which right now is the most correct approach IMO). Ifpos-tip
had a face, i also imagine it would inherit it fromtooltip
since fg and bg properties are already inherited fromtooltip
.Anyway this is more of a proposition to fix the need to have the possibility to customize the
pos-tip
quickhelp tooltip face (as seen in #98, #85, #81, #53, #50, #36). Tell me if you agree with the changes.I might be missing some logic behind the way the propertization is handled right now, so if there are any issues with this implementation let me know.
(probably the program should be reworked to use the newly created faces)