-
Notifications
You must be signed in to change notification settings - Fork 239
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
BUG: Deleting a buffer in the buffers view actually deletes the file--and NOT to trash/recycle by default #1692
Comments
there's a buffer_delete command bound to bd by default, but I agree with you that as a default, d should not delete a buffer's underlying file. apologies. |
Thanks for the information. Armed with that, and a couple of custom functions, I now have a neo-tree config that deletes buffers in buffer view instead of files and adds delete to trash/recycle for anyone interested. I'll post the relevant config below. First, here's the utility function you'll need, which in my case is in a
Next, here's my full neo-tree config for anyone having similar issues:
|
Did you check docs and existing issues?
Neovim Version (nvim -v)
NVIM v0.10.4
Operating System / Version
Windows 11 Pro x64
Describe the Bug
I just learned the hard way that deleting a buffer from the neo-tree buffers view doesn't delete only the buffer in memory: it deletes the file, and apparently permanently and not just to the trash/recycle. Ouch.
Screenshots, Traceback
No response
Steps to Reproduce
:Neotree position=top buffers
to show neo-tree's buffers view.Expected Behavior
I would expect invoking delete on a buffers view to delete only a buffer, not the underlying file.
Your Configuration
The text was updated successfully, but these errors were encountered: