Hi Alex!

On Sa, 26 Mai 2012, Alex Efros wrote:

> On Sat, May 26, 2012 at 07:59:41AM +0200, Christian Brabandt wrote:
> > I don't think so, but Bram has the final saying. I would certainly find 
> > it unexpected, if this would quit my vim. The error is simply telling 
> > you, that an autocommand closed a window/buffer and that's why Vim 
> > aborts executing the :q command.
> 
> That still doesn't make sense to me. If autocommand closed some
> window/buffer then current command should be aborted? Why is that?

I think this is because you could end up in a different window/buffer on 
which you probably don't want the original command to work with.

> Is there any way to work around this in BufWinLeave autocommand?

Not sure, perhaps something like this:
In the buffer, to which the location list belongs, you can set a 
buflocal variable of the winnr() of the location list. And on 
BufWinLeave of your original buffer, you can then close the location 
list that belongs to it. But I don't know if this works or if this also 
aborts.


regards,
Christian

-- 
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

Raspunde prin e-mail lui