Skip to content

fix: clear clipboard error #1838

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

Merged
merged 1 commit into from
Dec 18, 2022
Merged

fix: clear clipboard error #1838

merged 1 commit into from
Dec 18, 2022

Conversation

wilsonross
Copy link
Contributor

Calling api.fs.clear_clipboard() produces the following error:

E5108: Error executing lua: ...ed/nvim-tree.lua/lua/nvim-tree/actions/fs/copy-paste.lua:135: attempt to index field 'notify' (a nil value)
stack traceback:
        ...ed/nvim-tree.lua/lua/nvim-tree/actions/fs/copy-paste.lua:135: in function 'clear_clipboard'
        /Users/rosswilson/Home/nvim/plugin/tree.lua:34: in function </Users/rosswilson/Home/nvim/plugin/tree.lua:33>

Occurs when the clipboard is cleared and attempts to notify. Updated to remove utils and instead use notify directly

* Clear clipboard function was calling utils to
  notify when the clipboard was cleared
* This produced a nil value error
* Replaced with notify
@wilsonross wilsonross changed the title Fix: clear clipboard error fix: clear clipboard error Dec 18, 2022
Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for finding and fixing

@alex-courtis alex-courtis merged commit e0cfbbb into nvim-tree:master Dec 18, 2022
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

Successfully merging this pull request may close these issues.

2 participants