Closed QMonkey closed 7 years ago
Another solution is, using 'buflisted' rather than 'bufexists' function to check whether the buffer is exists or not. I perfer to say goodbye to unlisted buffers, so I make this pull request.
Hey! First of all, thanks!
I wish I had written tests for Bbye.vim off the bat so I'd remember whether the choice to use bdelete
was intentional. I wonder if it was because bwipeout
made it impossible to use Ctrl-o
to jump back after deleting a buffer... Do you know?
Yes, you are right. It is impossible to use ctrl-o to jump back after deleting a buffer by 'bwipeout'.
I make it be able to use ctrl-o to jump back after deleting a buffer. Just replace 'bufexists' with 'buflisted'. In my opinion, 'bdelee' should always correspond to 'buflisted'.
Hey, why'd you close this?
Unlisted buffers can be found by 'bufexists' function. However, 'bdelete' command cannot delete the unlisted buffer. That is why the error occurs.