Am 03.12.2012 11:25, schrieb Marcin Szamotulski:
Dear vim_dev,

I think I have found a bug in BufDelete autocommand.  When I delete
a buffer, load it (with the :buffer command) and then delete it again
(with :bdelete) the BufDelete autocommand group is not triggered.

I tested this with vim -u NONE --noplugin

:au BufDelete * :echom 'BufDelete' expand('<afile>')
:e /tmp/x
" Now in messages there is one buffer deleted - the [No Name] buffer
:bd
" Now in messages there is 'BufDelete /tmp/x'
:b1
" Next [No Name] buffer deleted, we are back in /tmp/x
:bd
" The BufDelete autocommand was not triggered

:bd makes buffers unlisted.
    :h 'bl

BufDelete is not executed for unlisted buffers.
Should :b {buf} always make buffers listed again?  I think "no".
Just set 'bl' manually, everything should be fine.

--
Andy

Note: Untested, you should re-check all statements.

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui