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

screen flickering when nvim window small #1123

Open
tfriedel opened this issue Aug 15, 2024 · 2 comments
Open

screen flickering when nvim window small #1123

tfriedel opened this issue Aug 15, 2024 · 2 comments

Comments

@tfriedel
Copy link

I start neovim in WSL like this:

NVIM_LISTEN_ADDRESS=127.0.0.1:55432 nvim --clean

Then I start nvim-qt:

"C:\Program Files\neovim-qt 0.2.18\bin\nvim-qt.exe" --server 127.0.0.1:55432 

This now mirrors the nvim in wsl.
If I resize the terminal showing WSL so it's smaller than the nvim-qt window,
the nvim in the terminal is starting to redraw / flicker like crazy.
In nvim-qt everything looks stable though.

What's causing this? Similar behaviour I also saw in goneovim but not in neovide.

@equalsraf
Copy link
Owner

This is probably related to how resizes are handled internally in the GUI vs the terminal UI - my guess is that it enters a loop where the GUI triggers a resize and then the terminal UI resizes it back (... and this continues in a loop). You can also check cpu usage to see if there is a loop going on.

Resize is handled in a few places, and we try to guard against obvious cases, but if the two UIs disagree on what the size should be they can always conflict:

There is a particular corner case - we don't resize when the window is maximized

@tfriedel
Copy link
Author

Yes, you are right it's entering a resize loop.
Not sure why I wrote that nvim-qt doesn't flicker. When I just tried it, both instances flicker.
Also cpu usage goes up.

What could be done about it?
Neovide must have solved it somehow.

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