Closed wusticality closed 1 year ago
https://github.com/zerolfx/copilot.el/blob/d4519e178217309833b98eb0f2bfbddc4edb4c2e/copilot.el#L539
Please try to remove this line and see what happens.
Hey, thanks for the prompt response. Commented out that line but it's still happening once the candidate is rendered in the copilot overlay:
Sorry for missing some essential details.
I can't reproduce this problem, so I can't help you much.
Removing this line should fix the color problem but not the position problem. After confirming the color problem is fixed, you can work on fixing the position problem, which is overlay-related. My solution for the position problem is using that copilot--posn-advice
, but in your case, it seems to be inadequate and fails 50% of the time.
Heya, thanks again for your time. Interesting that you're not seeing this on your end. Have you tried using copilot
in conjunction with something like lsp-mode
that has some latency? This behavior happens both on my Linux box and on my MacBook Pro.
Near as I can tell, it seems to happen if copilot
has candidates to display before company-box
. If so, the company-box
child frame gets pushed to the right of it. Perhaps a way to reproduce this on your end would be to show a company-box
after a delay or to try using lsp-mode
which has more latency? I'm happy to help in any way that I can.
Commenting out that advice doesn't seem to help either way.
~I can reproduce this problem after upgrading all my plugins. I will investigate it soon.~ Though I'm using the combination of company-box
+ lsp-mode
, I didn't often use Emacs recently and hadn't noticed the problem.
Fixed again. The previous fix (by copilot--posn-advice
) was invalidated by two previous improvements.
Thanks so much for this, at least on my MacBook pro, the positioning issue appears to be fixed. The color issue still occurs though (the company-box
child frame taking the color of the copilot overlay):
You can see that the color of the child frame on the right, and the documentation frame on the left are colored incorrectly.
I won't be able to test on my Linux box until I'm back home in a week or so.
@wusticality Are there any specific prerequisites required to trigger the color issue, such as only happening at the end of lines? I'm unable to reproduce the issue on my end.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
I've been using
company-box
in conjunction with this package. In some cases, it works as expected:Here, both
lsp-mode
candidates and copilot candidates are shown. However, other times, things to not work as expected, namely, the position of thecompany-box
child frame is moved by the copilot candidate overlay, and the color of the child overlay forcompany-box
is affected by the background color of the copilot overlay:This happens about 50% of the time for me. Thanks!