neovide: Neovide doesn't close until after clipboard has been changed externally

Describe the bug

After yanking to the unnamedplus clipboard, neovide hangs on exit until some other program changes the clipboard.

To Reproduce

Given a minimal config, ~/.config/nvim/init.vim:

autocmd!
set clipboard+=unnamedplus

then start neovide. Type:

yy:q!<CR>

Neovide will now hang, refusing to exit. It will immediately quit after copying to the clipboard from some other application.

Expected behavior

Neovide should not hang until the clipboard changes.

Desktop (please complete the following information):

  • OS: Linux 6.1.38-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Jul 5 23:49:30 UTC 2023 x86_64 GNU/Linux
  • Neovide Version 0.11.1
  • Neovim Version v0.9.1

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

neovide_rCURRENT.log

Additional context

Both lines of the config are necessary.

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Comments: 29 (13 by maintainers)

Most upvoted comments

I managed to reproduce the issue now, and reported a neovim bug

The problem started after https://github.com/neovim/neovim/commit/1d16bba4d8b8b648d2dabd610924bcf3051a0f29. It occurs then vim.o.clipboard = [[unnamed]] is configured (this is useful configuration). So, run neovide, use yank command then try quit. Neovide stucks. In ps ax the /usr/bin/xsel --nodetach -i -p exists, to close neovide window need to select something, for example by mouse.

Note, that neovim-qt has no problem with clipboard.