Monday, September 30, 2013

Re: BufEnter buggy?

On 9/28/13, Aaron Bohannon <aaron678@gmail.com> wrote:
> I have an autocmd that updates the window title in my terminal based on the
> current file name. BufEnter clearly seems to be the event I would want to
> trigger it with. But I've noticed two problems:
>
> (a) BufEnter isn't getting triggered after closing the last window in a tab
> and ending up in a different tab. ...

Which Vim version are you using? I remember such bug being reported by
someone and it was subsequently fixed before version 7.4. It can be
tested as follows:

tabnew Foo
autocmd BufEnter <buffer> let g:foo+=1
tabmove
tabnew
let g:foo = 0
wincmd c
echo g:foo

The output is:
0 (wrong) in Vim 7.3.829
1 (correct) in Vim 7.3.145, Vim 7.4.000

Regards,
Vlad

--
--
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 the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment