The commands provided by this plugin are not drop-in replacements for the built-in commands, because they cannot close buffers that are not attached to a window. This is due to if #windows == 0 then return end in the middle of buf_kill. This is inconvenient, because now, when I want to programmatically close a buffer, I have to first check whether it's attached to any windows and then call :bdelete or :Bdelete appropriately. Is there a reason for this restriction? It looks like the code will work fine without it, and it would make this plugin more general-purpose.
The commands provided by this plugin are not drop-in replacements for the built-in commands, because they cannot close buffers that are not attached to a window. This is due to
if #windows == 0 then return end
in the middle ofbuf_kill
. This is inconvenient, because now, when I want to programmatically close a buffer, I have to first check whether it's attached to any windows and then call:bdelete
or:Bdelete
appropriately. Is there a reason for this restriction? It looks like the code will work fine without it, and it would make this plugin more general-purpose.