rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

White flickering when opening NeoVim and setting colorscheme #157

Open jiri opened 8 years ago

jiri commented 8 years ago

When launching NeoVim, my window flickers in white for a second before I see the UI. This also seems to happen when I source $MYVIMRC.

This is apparently caused by setting the colorscheme, since commenting that line out stops the flicker. However, issuing that command manually doesn't cause the flicker to occur.

jiri commented 8 years ago

I'm using OSX El Capitan, and the colorscheme is base16-eighties. As it seems, using desert doesn't cause the issue.

kitten commented 8 years ago

I think it's caused by #132 which is a quick fix for #130. Could that be @bambu?

bambu commented 8 years ago

Yup. Also #91 can be thrown into the mix. as well as a couple other issues in the neovim repo (referenced in 91)

The issue is that there is no way to launch nvim with flags that tell it to set the gui_running flag to true. So when the gui connects to nvim, it re-sources $MYVIMRC and as such you get the graphical flicker if you are going from one colorscheme to another or if the colorscheme you are using has special modes for when gui_running is set.

rogual commented 8 years ago

Perhaps we could hide the window and show it once init is complete. Although then if any errors occur you're stuck with a hidden window.

jiri commented 8 years ago

That sounds like a fix, not a solution. This should probably be propagated directly to neovim, so a way to set the flag for GUI wrappers is implemented.

rogual commented 8 years ago

There was an issue on Neovim — https://github.com/neovim/neovim/issues/2216 — but it doesn't sound like they're going to change this.

Sourcing .vimrc twice is not ideal, but I can't think of a better way to keep compatibility with Vim plugins.

rogual commented 8 years ago

Opened https://github.com/neovim/neovim/issues/3646 with Neovim, let's see what they say.