Hi Christian,
On 2014-02-17, Christian Brabandt wrote:
> Hi Gary!
>
> On Mo, 17 Feb 2014, Gary Johnson wrote:
>
> > Yes, --cmd does execute its arguments early, "before processing any
> > vimrc file", but I am using it to define an autocommand. It's the
> > timing of the triggering of the autocommand that I think is wrong,
> > or at least that I don't understand.
>
> What makes you think, your autocommand shouldn't trigger for the first
> buffer that is entered?
I am opening only one buffer in this example. I do think it should
trigger for the first buffer.
The description of BufWinEnter says that it is triggered "After a
buffer is displayed in a window." It is not clear what that means,
exactly, in terms of the operations that Vim performs on a buffer in
a window. I assume that it means that Vim has finished performing
any operations on that window that it is going to before it gives
control to the user.
When I first see the buffer displayed in the window after executing
"vim -q errorfile", the cursor is on the line given in the first
error line of 'errorfile'. I would assume that is the line number
of the cursor "after [the] buffer is displayed in a window." That
would be the value of 'line(".")' at the time that the BufWinEnter
event it triggered.
What I am seeing instead is that the BufWinEnter event is triggered
_before_ the cursor is moved to the first error line. This may be
consistent with the meaning of "after [the] buffer is displayed in a
window", but it is not very useful.
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.