Open jcowgar opened 2 years ago
To add to this issue, this seriously hurts usability. Since the width changes while navigating the menu by pressing up and down, options with long text occasionally wraps and unwraps, causing all the options below to jump up and down. The width of the popup should be kept no smaller than the longest line among the options.
does anybody have solution for this? I'm really bad with lua
Recently started using this in combination with coc-code-action-menu
and I'm sad there doesn't seem to be a fix yet.
From what I gather, the overall width of the menu depends on the width of the code window, but sometimes there's no code window at all. The width should be determined based on the longest action's text.
This is quite unpractical.
I believe I fixed it in https://github.com/weilbith/nvim-code-action-menu/pull/69
Now it's just a matter of keeping our fingers crossed that @weilbith is still around and maintains this repository 😅
Sorry, I struggle a lot with this plugin. It is in a prototype state and any rewrite I did has been discarded by myself. Was unlucky to share this on Reddit. I feel really sorry about this. Thinking about archiving it.
Anyhow, in regards of this ticket, could anybody try out the PR and confirm that it solves the problem for him? Then I'm happy to just merge it.
The windows change in width and many times word wrap when moving from option to option in the menu. I introduced an error in my NeoVim config to show this problem. I've attached two screen shots.
It seems to take the width of the diff window.
To replicate, add unpack() with no parameters in your NeoVim .lua config somewhere and call CodeActionMenu with your cursor on unpack().
![two](https://user-images.githubusercontent.com/251686/166301602-9f437c54-7b03-46e7-989c-4eba8c7225db.png)