(a) BufEnter isn't getting triggered after closing the last window in a tab and ending up in a different tab. It *should* be getting triggered, right? I mean, it gets triggered when I close a window and end up in a different window in the same tab, so why wouldn't it get triggered when I close a tab?
(b) When switching directories in netrw (which switches buffers), BufEnter gets triggered before the directory location is known, so expand('%') will be empty. But once I'm in the directory, I get the directory location just fine by calling expand('%'), so I'm not sure how netrw is changing the buffer location *after* the BufEnter event. It seems like there's some questionable logic going on there, but I'm not sure who's to blame.
...Aaron
autocmd BufEnter * let g:foo = expand('%')
And then I'd check the value of g:foo with :echo after switching/closing windows.
The autocmd that sets the variable does not get run when I close the last window on a tab page. It is easy to check that it _does_ get run in other circumstances.
--
--
You received this message from the "vim_use" 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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/rIDzIjQ04sc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.