Thursday, May 25, 2017

Re: Bug in ftdetect?

On Mi, 24 Mai 2017, Frew Schmidt wrote:

> I'm glad you were able to come up with a solution!

So much for the unwillingness of the vim maintainers to fix this issue.

> So I guess `vim *` goes through a different codepath than `:args *`?

Don't think so. Perhaps the autocommand wasn't set up by the time the
argument list was filled.

> Note that this also affects the quickfix, the location list, and the
>local args list. Initially I discovered this issue with `:cexpr` and
>reproduced it with `:lexpr` and `:args`/`:largs`, but it was easiest to
>reproduce with `:args *`.

That is a different story here, I think my proposed patch wouldn't
change that, but I think the reason is similar, the BufNew autocommand
triggering the FileType detection. In fact while looking into a profile,
it looked like the most expensive call was the syn clear command from
the SynSet function that was called for each file. However I am not
sure, why the FileType and Syntax autocommands are actually triggered
from the BufNew event, since they shouldn't nest (see other message from
me in this thread). So perhaps we need a similar change here as well.
Can you provide a reproducible example for the :cexpr case please)?

Best,
Christian
--
Tugend nennt man die Summe der Dinge, die wir aus Trägheit, Feigheit
oder Dummheit nicht getan haben.
-- Henry Miller

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

Post a Comment