tpope / vim-vinegar

vinegar.vim: Combine with netrw to create a delicious salad dressing
https://www.vim.org/scripts/script.php?script_id=5671
2.22k stars 87 forks source link

Fix bug closing netrw with :bd #114

Closed faerryn closed 4 years ago

faerryn commented 4 years ago

Bug: Using VinegarUp to open netrw and then closing netrw with :bd fails. Need another :bd to close netrw.

Tested on: Neovim 0.4.3 from the Arch Linux repositories

Solution: Replace calls to 'edit' with 'Explore', 'tabedit' with 'Texplore', and so on. :Explore is the appropriate command to summon netrw. :edit doesn't play nice with opendir (don't know why tho)

Do I have any clue what the underlying reason for the bug is? No

However, I can show Results: A single :bd is all that is needed to close instances of netrw opened from VinegarUp.

Added Benefits: :Explore is more self-documenting (explicitly netrw command).

Sorry for the lack of commit comments (I wasn't planning on pull requesting them when I forked)