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

Neovide hover popup overflows the window edge to the right/bottom and not staying within window boundaries #1641

Closed
juhaku opened this issue Nov 17, 2022 · 6 comments · Fixed by #1977
Labels
bug Something isn't working multigrid Related to the multigrid extension neovim-upstream Requires/is blocked on a change in Neovim itself

Comments

@juhaku
Copy link

juhaku commented Nov 17, 2022

Describe the bug
When hovered over method / function / struct etc declaration the hover box overflows over the right screen edge when opened with neovide. But when same operation is performed with neovim using terminal or in this case KDE's konsole the hover will not overflow the screen edge but stays withing the window boundaries.

I am aware there was previously bug related it overflowing to the left, but did not find a issue related it bleeding to the right of the window.

To Reproduce
Steps to reproduce the behavior:

  1. Open any file which has language support protocol enabled with support for hovering documentation.
  2. Either make window small enough (for example splitting) or make sure you have big enough hover documentation available.
  3. Open hover e.g. hovering a function / method / struct / class etc. declaration.
  4. See if the hover window stays withing the window (and within split window).

Expected behavior
The hover should stay within the window boundaries and not overflow to the right.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Manjarjo KDE / Endeavour OS KDE / v. 5.26 ->
  • Neovide Version 0.10.3
  • Neovim Version 0.8.0 ->

Please run neovide --log and paste the contents of the .log file created in the current directory here:

Additional context
Attached log files since the content would be too large to paste in this thread.
neovide_r2022-11-18_00-39-32.log
neovide_rCURRENT.log

@juhaku juhaku added the bug Something isn't working label Nov 17, 2022
@juhaku
Copy link
Author

juhaku commented Nov 20, 2022

It also overflows to the bottom as seen in first image from neovide. The latter image is from terminal (KDE konsole) neovim.
image
image

@juhaku juhaku changed the title Neovide hover popup overflows the window edge to the right and not staying within window boundaries Neovide hover popup overflows the window edge to the right/bottom and not staying within window boundaries Nov 20, 2022
@MultisampledNight MultisampledNight added the multigrid Related to the multigrid extension label Nov 22, 2022
@fredizzimo
Copy link
Member

This is probably fixed by #1786

@juhaku
Copy link
Author

juhaku commented Apr 2, 2023

@fredizzimo Just tested with master branch and result is still the same.
image

@fredizzimo
Copy link
Member

This looks like a Neovim bug, according to the logs it does not report the correct position. I will report the bug on their issue tracker. It might be possible that we are expected to do the positioning ourselves, but let's see what the response is first.

I think it's this code that is the problem
https://github.com/neovim/neovim/blob/996dd36c77321ea91758b5996d152a2f37af99dd/src/nvim/window.c#L986-L1018

@fredizzimo fredizzimo added the upstream Related to a library used in neovide label Jul 31, 2023
@fredizzimo fredizzimo added neovim-upstream Requires/is blocked on a change in Neovim itself and removed upstream Related to a library used in neovide labels Aug 7, 2023
@fredizzimo
Copy link
Member

This Neovim issue has been crated neovim/neovim#24801

@fredizzimo
Copy link
Member

This will be fixed by #2029. But it would still have been better for Neovim to deal with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working multigrid Related to the multigrid extension neovim-upstream Requires/is blocked on a change in Neovim itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants