AckslD / nvim-neoclip.lua

Clipboard manager neovim plugin with telescope integration
994 stars 20 forks source link

Copying from nvim tree error #109

Closed ptakpatryk closed 10 months ago

ptakpatryk commented 10 months ago

Getting this error when trying to copy file name or path from nvim tree. It does end up in the register but not in the neoclip.

Error detected while processing TextYankPost Autocommands for "*":
E5108: Error executing lua ...hare/nvim/lazy/nvim-neoclip.lua/lua/neoclip/handlers.lua:9: attempt to get length of field 'regcontents' (a nil value)
stack traceback:
        ...hare/nvim/lazy/nvim-neoclip.lua/lua/neoclip/handlers.lua:9: in function 'should_add'
        ...hare/nvim/lazy/nvim-neoclip.lua/lua/neoclip/handlers.lua:45: in function 'handle_yank_post'
        [string ":lua"]:1: in main chunk
        [C]: in function 'nvim_exec_autocmds'
        ...zy/nvim-tree.lua/lua/nvim-tree/actions/fs/copy-paste.lua:266: in function 'fn'
        ...ocal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/api.lua:49: in function <...ocal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/api.lua:46>

@edit The event that comes to the should_add function is vim.empty_dict() so it might actually be nvim-tree issue.

tan-wei commented 10 months ago

Met the same issue. Waiting for the PR is merged.