Lech Lorens wrote:

> There's a problem with tabpages and BufWinLeave autocommand: when
> exiting a buffer which is displayed in the only window in a tab,
> the autocommand fires already in a different tab. This can be shown by
> executing the following commands in a new Vim session:
> 
> #v+
> tabnew
> tabdo windo echo "Buffer" bufnr('') "is in tab page" tabpagenr()
> autocmd BufWinLeave <buffer> echo "When executing BufWinLeave for
> buffer " expand("<abuf>") "we're in tab page" tabpagenr()
> echo "Before we quit, we're in tab page" tabpagenr()
> q
> echo "After we've quit, we're in tab page" tabpagenr()
> #v-
> 
> Expected output should include:
> When executing BufWinLeave for buffer 2 we're in tab page 2
> 
> but what I actually get is:
> When executing BufWinLeave for buffer 2 we're in tab page 1
> 
> In other words: while the documentation states that BufWinLeave is triggered
> *before* buffer is removed from a window, in this particular case it is
> triggered *after* the fact.
> This causes commands to have effect on wrong windows.

I'll add it in the todo list.  But don't expect a fix soon.

-- 
>From "know your smileys":
 :-)    Funny
 |-)    Funny Oriental
 (-:    Funny Australian

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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