Ingo Karkat wrote:

> On 27-Jun-2017 00:01 +0200, mseplowitz wrote:
> 
> > A recent patch seems to have changed the behavior of how my plugins
> > load. In particular, it looks like plugin files in
> > pack/*/start/*/plugin/*.vim are loaded twice.
> > 
> > I'm fairly sure this is an effect of patch 8.0.0612
> > (https://github.com/vim/vim/commit/ce876aaa9a250a5a0d0e34b3a2625e51cf9
> bf5bb).
> >
> > 
> [55 lines deleted]
> 
> You're right, and thank you for the great and detailed analysis!
> You've clearly succeeded in making the fixing as easy as possible :-)
> That pack plugins are sourced twice is indeed a regression and an
> oversight from my previous patch. I've just submitted a pull request
> that corrects the problem (and adds a test):
> 
>     https://github.com/vim/vim/pull/1801

Thanks.  However, this still changes the order in which plugins are
loaded.  We do want the plugins from "start" to be loaded after
'runtimepath' plugins.  I'll make another solution, but include your test.

> > If this behavior is works-as-designed and/or I should be looking
> > into making my plugin files resilient to being loaded a second
> > time, please let me know.
> 
> Most plugins have a multiple-inclusion guard in the form
> 
>     if exists('g:loaded_pluginname')
>       finish
>     endif
> 
> It's not required, but a good idea. Plugin reloads can happen for
> multiple reasons (not just bugs), for example duplicate :packadd
> commands, or having the same plugin installed twice under different
> pack paths.

-- 
>From "know your smileys":
 |-P    Reaction to unusually ugly C code

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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/d/optout.

Raspunde prin e-mail lui