Christian Brabandt wrote:
>
> > Bram,
> > if you run:
> >
> > :au BufEnter * echomsg printf("Entering buffer: %s buftype: %s",
> > expand("<afile>"), &buftype)
> >
> > and then you type :term
> >
> > you'll notice that by the time the BufEnter is triggered, the buftype
> > option is not set yet. So one cannot detect reliably that the new buffer
> > will be a terminal buffer.
> >
> > So how about this current patch:
>
> I attach a better patch, that cleans up correctly.
Not sure if this is useful. BufEnter will be triggered again when leaving the
window and coming back. Thus when using it for something to initialize the
buffer or interacting with the job that was just started, would require a check
that this wasn't done before.
A TermOpen event makes more sense, but then it's yet-another-event.
If we are going that way, we should find out what events we want associated
with a terminal window. E.g., how about entering and exiting the terminal
loop? Switching between Terminal-Job and Terminal-Normal mode?
Practical examples should help decide what works best.
--
hundred-and-one symptoms of being an internet addict:
85. Choice between paying Compuserve bill and paying for kids education
is a no brainer -- although a bit painful for your kids.
/// 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.