Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pum_getpos() seems to return wrong value for ext_popupmenu #388

Closed
acomagu opened this issue Jul 15, 2022 · 4 comments
Closed

pum_getpos() seems to return wrong value for ext_popupmenu #388

acomagu opened this issue Jul 15, 2022 · 4 comments

Comments

@acomagu
Copy link

acomagu commented Jul 15, 2022

When I see popup like this:

image

pum_getpos() returns such value:

image

The values of width, height and size seems to be far from those of native pum.

image

image

I understand they won't be exact same value, but I guess width and height should be more smaller.

Why I need this to be fixed

I use nvim-cmp as completion engine. When I use it with GoNeovim ExtPopupMenu, the floating window of documentation next to popup menu appears very narrow.

image

This problem may be caused because the width value of pum_getpos() is wrong.

Thank you!

@akiyosi
Copy link
Owner

akiyosi commented Jul 15, 2022

@acomagu
Hi :D
Thanks for this issue report.
I was aware of the problem with the narrowing of the attached float window of the pop-up menu displayed by the completion plugin, but left it unattended because the cause was unknown :P

When ext_popupmenu is enabled, the ui uses nvim_ui_pum_set_bounds({width}, {height}, {row}, {col}) to inform the Neovim side of the position and size information of the external popup menu.
The cause of the problem was that the width and height in these arguments were passed as numerical values in pixels.

This problem has been fixed in 7024c9f.

@acomagu
Copy link
Author

acomagu commented Jul 15, 2022

@akiyosi I can see it's fixed! Thank you for your incredibly quick work!

@acomagu acomagu closed this as completed Jul 15, 2022
@akiyosi
Copy link
Owner

akiyosi commented Jul 26, 2022

@acomagu
Also, I fixed a problem in 10fe882 with external popupmenu where the menu parts would partially cover the icon display, as seen in your screen capture.

@acomagu
Copy link
Author

acomagu commented Jul 26, 2022

@akiyosi Wow, you helped me a lot!! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants