I run vim with no file on the command-line, so that it shows the scratch
buffer. When I then run
:e foo
to edit file 'foo', there is a BufUnload event triggered for file 'foo'. Here
is a test vim command that I use to demonstrate the issue:
autocmd BufUnload * echom "Unloaded " . expand("<afile>")
I posted this issue to stackoverflow, where user Ingo Karkat responded:
I can reproduce this with the latest Vim 7.4a.39. I guess this has to do with
the fact that Vim reuses the initial scratch buffer number (1) for the first
:edited file. Please report this problem to the vim_dev mailing list.
--
--
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/groups/opt_out.