Davit Samvelyan wrote:
> To reproduce:
> gvim --noplugin -c "edit aaa|vsplit bbb|let b:foo='blabla'|wincmd l|autocmd
> BufWinLeave bbb echo b:foo"
>
> then if you execute ":verbose qa" command from 'aaa' buffer the following
> output will be printed:
> Error detected while processing BufWinLeave Auto commands for "bbb":
> E121: Undefined variable: b:foo
> E15: Invalid expression: b:foo
>
> But the same command executed from 'bbb' buffer works fine.
>
> If you run qa in debug mode you can see that 'echo b:foo' is called for 'aaa'
> buffer.
And:
> Here is the debug output:
>
> Entering Debug mode. Type "cont" to continue.
> cmd: qa
> >step
> BufWinLeave Auto commands for "bbb"
> cmd: echo b:foo
> >file
> "aaa" [New file] --No lines in buffer--
> >echo bufname("%")
> aaa
This is to be expected. See the help for BufWinLeave:
NOTE: When this autocommand is executed, the
current buffer "%" may be different from the
buffer being unloaded "<afile>".
When exiting and v:dying is 2 or more this
event is not triggered.
--
If someone questions your market projections, simply point out that your
target market is "People who are nuts" and "People who will buy any damn
thing". Nobody is going to tell you there aren't enough of those people
to go around.
(Scott Adams - The Dilbert principle)
/// 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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.