Hi ZyX!

On Fr, 28 Sep 2012, ZyX wrote:

>     vim -u NONE -c 'autocmd BufUnload * echom expand("<abuf>") bufnr("%")' \
>                 -c 'vnew' \
>                 -c 'echom bufnr("%")' \
>                 -c 'bw! 1'
> . You will see
>     2
>     1 2

> . Obviously, that means that current and unloaded buffers are
> different. You may replace first “echom” with “setlocal” and see that
> option is set for a wrong buffer. Your autocmd must not be used.

You are changing buffers and wiping a buffer. I am not sure what you are 
trying to show here.

> By the way, “bufnr('%')” is almost always different from «"<afile>"».
> First is buffer number, second is a plain string. Or a filename if you
> meant “expand("<afile>")”.

Of course. I thought that is obvious.


Mit freundlichen Grüßen
Christian
-- 
Unsere Meinungen: Die Haut, in der wir gesehen werden wollen.
                -- Friedrich Wilhelm Nietzsche

-- 
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