Christian Brabandt wrote:
> Gary,
>
> Am 2014-02-17 23:52, schrieb Gary Johnson:
> > Thanks for your patience with this and willingness to work it
> > through. I think we're still not on the same page, however.
> >
> > In my example I use the following autocommand:
> >
> > au BufWinEnter * let a=line(".")
> >
> > Let us assume that you are correct that this autocommand triggers
> > twice, once for the creation of buffer 1 and once for the creation
> > of buffer 2. After the creation of buffer 2, 'a' should contain the
> > value of some line number in buffer 2.
>
> You are correct, I haven't thought about that. One would expect the
> autocommand to trigger, after the cursor is positioned on the error,
> but in fact it is triggered, when the file is loaded but before the
> cursor is moved to the error.
>
> One could consider this a bug. I am however sure, that once we fix
> this behaviour, there are many more cases were we need to postpone the
> BufWinEnter autocommand until the cursor is finally moved to the
> correct position.
>
> But hey, no risk, no fun ;)
> so here is a patch, that prevents this behaviour in your case.
I don't see where it is mentioned that BufWinEnter gets triggered after
positioning the cursor. I don't think we can guarantee that. It's
triggered after a buffer is loaded into a window. It's supposed to be
used for any specific settings you want to apply to the window.
I think this patch makes it too complicated.
--
CUSTOMER: Well, can you hang around a couple of minutes? He won't be
long.
MORTICIAN: Naaah, I got to go on to Robinson's -- they've lost nine today.
CUSTOMER: Well, when is your next round?
MORTICIAN: Thursday.
DEAD PERSON: I think I'll go for a walk.
The Quest for the Holy Grail (Monty Python)
/// 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/groups/opt_out.