Wednesday, May 24, 2017

Re: Bug in ftdetect?

On May 24, Christian Brabandt wrote:

> [...]
>
> However, I think you might have found a bug here. Your
> ftdetect script does this:

I don't know that I'd characterise it as a bug, since this:

> autocmd BufNew,BufNewFile,BufRead *.md :set filetype=markdown
>
> The :args command does fill the argument list, calls
> ex_next() which calls eventually alist_set() and then
> iterates over the argument list [... firing off
> autocommands ...]. So in the end, we are iterating over
> the whole list of arguments and call autocommands, for
> buffers that are not even going to be displayed next.

... is what I'd expect from reading :h bufnew.

> [... patch to prevent filetype autocmd firing during
> loading the args list ...]

Bug or not, this seems like it could be helpful. --Antony

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: