tversteeg / registers.nvim

πŸ“‘ Neovim plugin to preview the contents of the registers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clipboard error "target STRING not available"

Valodim opened this issue Β· comments

First of all, thanks for this simple and useful nvim plugin! Super useful πŸ‘

When I copy an image to the clipboard (e.g. my avatar while writing this issue on github), registers.nvim break outputting this error:

E5108: Error executing lua ...os/github.com/tversteeg/registers.nvim/lua/registers.lua:81: Vim:clipboard: provider returned invalid data

Hi, thanks for the report. What OS are you using? I can't reproduce this myself running Debian.

I'm using NixOS, with neovim built from the 0.5.0 tag. Perhaps it's just an issue with neovim itself? The API call looks pretty innocent really on your side. Maybe it's worth catching the exception and simply considering the register empty if it fails?

\\ edit

Ah, this issue sounds related: neovim/neovim#2642

going by this comment, the issue might be something about neovim using xsel vs xclip as clipboard provider? Whatever the root cause, it seems the call can fail in unexpected ways on some neovims.

Closing this issue because it doesn't seem to be related to this plugin.