@@ -432,6 +432,13 @@ vim_main2(void)
432432 if (p_lpl )
433433 {
434434 char_u * rtp_copy = NULL ;
435+ char_u * plugin_pattern = (char_u * )
436+ # if defined(VMS ) || defined (AMIGA ) // VMS and Amiga don't handle the "**".
437+ "plugin/*.vim"
438+ # else
439+ "plugin/**/*.vim"
440+ # endif
441+ ;
435442
436443 // First add all package directories to 'runtimepath', so that their
437444 // autoload directories can be found. Only if not done already with a
@@ -444,12 +451,7 @@ vim_main2(void)
444451 add_pack_start_dirs ();
445452 }
446453
447- source_in_path (rtp_copy == NULL ? p_rtp : rtp_copy ,
448- # ifdef VMS // Somehow VMS doesn't handle the "**".
449- (char_u * )"plugin/*.vim" ,
450- # else
451- (char_u * )"plugin/**/*.vim" ,
452- # endif
454+ source_in_path (rtp_copy == NULL ? p_rtp : rtp_copy , plugin_pattern ,
453455 DIP_ALL | DIP_NOAFTER , NULL );
454456 TIME_MSG ("loading plugins" );
455457 vim_free (rtp_copy );
@@ -460,13 +462,8 @@ vim_main2(void)
460462 load_start_packages ();
461463 TIME_MSG ("loading packages" );
462464
463- # ifdef VMS // Somehow VMS doesn't handle the "**".
464- source_runtime ((char_u * )"plugin/*.vim" , DIP_ALL | DIP_AFTER );
465- # else
466- source_runtime ((char_u * )"plugin/**/*.vim" , DIP_ALL | DIP_AFTER );
467- # endif
465+ source_runtime (plugin_pattern , DIP_ALL | DIP_AFTER );
468466 TIME_MSG ("loading after plugins" );
469-
470467 }
471468#endif
472469
0 commit comments