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

nvui window does not close with latest neovim releases. #153

Open
damanis opened this issue Jan 23, 2023 · 4 comments
Open

nvui window does not close with latest neovim releases. #153

damanis opened this issue Jan 23, 2023 · 4 comments

Comments

@damanis
Copy link

damanis commented Jan 23, 2023

Steps to reproduce:

Expected: file saved, then nvui closed
Problem: nvui window isn't closed. The neovim process (ps ax) does not exist, but nvui process still exists.

It is not nvui specific, goneovim also has it, but not nvim-qt. Seems, something changed in nvim API.

@damanis damanis closed this as completed Jan 23, 2023
@damanis
Copy link
Author

damanis commented Jan 26, 2023

It relates to configuration option o.clipboard = [[unnamed]] in nvim init file.
When the option is commented out, there is no problem, but it required for PRIMARY selection support.

@damanis damanis reopened this Jan 26, 2023
@damanis
Copy link
Author

damanis commented Jan 31, 2023

Also, the problem caused by any clipboard operation, not change/save only.

@damanis
Copy link
Author

damanis commented Feb 6, 2023

At exit the /usr/bin/xsel --nodetach -i -p is called to save * register to primary selection. Same for + register (system clipboard).
By default, primary selection of X application should be lost when the application exists, but neovim changed this behavior and tries save it. The workaround below prevents nvui stuck at exit.

if vim.g.nvui then
  -- Workaround: clear primary before exit
  vim.api.nvim_exec([[
    :autocmd VimLeavePre * call setreg('*', [])
    :autocmd VimLeavePre * call setreg('+', [])
  ]], false)

@damanis
Copy link
Author

damanis commented Feb 28, 2023

Seems, it caused by neovim/neovim@1d16bba

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

1 participant