Hi, 
Accessing buffer in 'BufDelete' or 'BufWipeout' autocmd makes hidden
buffer displayed. Here's the test code:

fun! WipeOutAll()
    for i in range(1, bufnr('$'))
        exe "silent! bw" i
    endfor
endfun
fun! OnRemoving()
    let name = expand('<afile>')
    exe "b" name
    call append("$", "Refuse to die")
endfun

sp buffer1
au BufWipeout <buffer> call OnRemoving()
sp buffer2
au BufWipeout <buffer> call OnRemoving()

call WipeOutAll()

This code shows 2 unexpected behaviors:
1) After ":source" this test script, ":ls" reports:
  2 %h + "buffer1"                      line 1
but the doc says 'hidden' buffers are not displayed.

2) Both "Refuse to die" lines goes into one buffer, but I think they
should be dispatched to each buffer (I mean one line per buffer) before
they are being wiped out.

Vim-7.2-166

Thanks.

-- 
Dasn


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui