comparison src/main.c @ 23025:3204c5e23474 v8.2.2059

patch 8.2.2059: Amiga: can't find plugins Commit: https://github.com/vim/vim/commit/6ee874d378829b62e0944063a9a029e81b5debfb Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 27 19:01:31 2020 +0100 patch 8.2.2059: Amiga: can't find plugins Problem: Amiga: can't find plugins. Solution: Do not use "**" in the pattern. (Ola S?der, closes https://github.com/vim/vim/issues/7384)
author Bram Moolenaar <Bram@vim.org>
date Fri, 27 Nov 2020 19:15:04 +0100
parents 8af8aa57dd8a
children ad674a98058a
comparison
equal deleted inserted replaced
23024:201ca8c66377 23025:3204c5e23474
430 * Only when compiled with +eval, since most plugins need it. 430 * Only when compiled with +eval, since most plugins need it.
431 */ 431 */
432 if (p_lpl) 432 if (p_lpl)
433 { 433 {
434 char_u *rtp_copy = NULL; 434 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 ;
435 442
436 // First add all package directories to 'runtimepath', so that their 443 // First add all package directories to 'runtimepath', so that their
437 // autoload directories can be found. Only if not done already with a 444 // autoload directories can be found. Only if not done already with a
438 // :packloadall command. 445 // :packloadall command.
439 // Make a copy of 'runtimepath', so that source_runtime does not use 446 // Make a copy of 'runtimepath', so that source_runtime does not use
442 { 449 {
443 rtp_copy = vim_strsave(p_rtp); 450 rtp_copy = vim_strsave(p_rtp);
444 add_pack_start_dirs(); 451 add_pack_start_dirs();
445 } 452 }
446 453
447 source_in_path(rtp_copy == NULL ? p_rtp : rtp_copy, 454 source_in_path(rtp_copy == NULL ? p_rtp : rtp_copy, plugin_pattern,
448 # ifdef VMS // Somehow VMS doesn't handle the "**".
449 (char_u *)"plugin/*.vim",
450 # else
451 (char_u *)"plugin/**/*.vim",
452 # endif
453 DIP_ALL | DIP_NOAFTER, NULL); 455 DIP_ALL | DIP_NOAFTER, NULL);
454 TIME_MSG("loading plugins"); 456 TIME_MSG("loading plugins");
455 vim_free(rtp_copy); 457 vim_free(rtp_copy);
456 458
457 // Only source "start" packages if not done already with a :packloadall 459 // Only source "start" packages if not done already with a :packloadall
458 // command. 460 // command.
459 if (!did_source_packages) 461 if (!did_source_packages)
460 load_start_packages(); 462 load_start_packages();
461 TIME_MSG("loading packages"); 463 TIME_MSG("loading packages");
462 464
463 # ifdef VMS // Somehow VMS doesn't handle the "**". 465 source_runtime(plugin_pattern, DIP_ALL | DIP_AFTER);
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
468 TIME_MSG("loading after plugins"); 466 TIME_MSG("loading after plugins");
469
470 } 467 }
471 #endif 468 #endif
472 469
473 #ifdef FEAT_DIFF 470 #ifdef FEAT_DIFF
474 // Decide about window layout for diff mode after reading vimrc. 471 // Decide about window layout for diff mode after reading vimrc.