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

Slow or fail to exit when Python code is executed after GuiClose #394

Closed
micbou opened this issue Feb 17, 2018 · 4 comments
Closed

Slow or fail to exit when Python code is executed after GuiClose #394

micbou opened this issue Feb 17, 2018 · 4 comments

Comments

@micbou
Copy link

micbou commented Feb 17, 2018

When Python code is executed after the GuiClose function, nvim-qt takes several seconds to exit or does not exit at all with the message Press Enter or type command to continue on the command line. Pressing the enter key twice will then exit Neovim.

Steps to reproduce:

  • nvim-qt -- -u NORC
  • :autocmd VimLeave * python pass (replace python pass with python3 pass if using Python 3)
  • :q

Here are the logs from these steps with set verbose=15. Looks like Neovim gets into an infinite loop calling alternatively GuiClose and python pass.

Related issue: ycm-core/YouCompleteMe#2919.

Configuration:

@bonderado
Copy link

Possibly related to #341.

equalsraf pushed a commit that referenced this issue Jul 25, 2018
If the shim is running the VimLeave event sends a notification to the
Gui (GuiClose) so that it shuts down too.

This notification triggers the neovimGuiCloseRequest which causes the
main window to call Shell::close() which in turn calls "qa". So a loop
is established where nvim calls the GUI to shutdown and the GUI calls
"qa" that triggers again the notification.

Avoid this with a boolean flag in the main window i.e. if a closeEvent
is triggered in the main window, and nvim already requested a close,
just close the window.
@equalsraf
Copy link
Owner

Does #435 fix this for you?

@micbou
Copy link
Author

micbou commented Jul 25, 2018

It does. Thanks!

@equalsraf
Copy link
Owner

Merged into master.

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

3 participants