On 2014-02-18, 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.
Thanks very much, Christian!
It took me a while to apply your patch because it was corrupted and
it took me a while to find the nature of the corruption, too. All
of the context lines were indented by an extra single space. Once I
removed the extra space from those lines, it applied fine.
With this patch, Vim passes my example, but the plugin still has the
problem of not displaying the right information, so I have some more
debugging to do.
I try not to apply too many patches to Vim, but I'm now running with
five: two of mine and three of yours.
Regards,
Gary
--
--
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.