To: vim_dev@googlegroups.com Subject: Patch 7.4.1699 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1699 Problem: :packadd does not work the same when used early or late. Solution: Always load plugins matching "plugin/**/*.vim". Files: src/ex_cmds2.c, src/testdir/test_packadd.vim *** ../vim-7.4.1698/src/ex_cmds2.c 2016-03-19 14:16:34.611690741 +0100 --- src/ex_cmds2.c 2016-04-02 22:29:44.513040078 +0200 *************** *** 3376,3382 **** if (load_files) { ! static char *plugpat = "%s/plugin/*.vim"; static char *ftpat = "%s/ftdetect/*.vim"; int len; char_u *pat; --- 3376,3382 ---- if (load_files) { ! static char *plugpat = "%s/plugin/**/*.vim"; static char *ftpat = "%s/ftdetect/*.vim"; int len; char_u *pat; *** ../vim-7.4.1698/src/testdir/test_packadd.vim 2016-03-13 13:24:38.968183573 +0100 --- src/testdir/test_packadd.vim 2016-04-02 22:33:35.790668771 +0200 *************** *** 11,17 **** endfunc func Test_packadd() ! call mkdir(s:plugdir . '/plugin', 'p') call mkdir(s:plugdir . '/ftdetect', 'p') set rtp& let rtp = &rtp --- 11,17 ---- endfunc func Test_packadd() ! call mkdir(s:plugdir . '/plugin/also', 'p') call mkdir(s:plugdir . '/ftdetect', 'p') set rtp& let rtp = &rtp *************** *** 21,26 **** --- 21,30 ---- call setline(1, 'let g:plugin_works = 42') wq + exe 'split ' . s:plugdir . '/plugin/also/loaded.vim' + call setline(1, 'let g:plugin_also_works = 77') + wq + exe 'split ' . s:plugdir . '/ftdetect/test.vim' call setline(1, 'let g:ftdetect_works = 17') wq *************** *** 28,33 **** --- 32,38 ---- packadd mytest call assert_equal(42, g:plugin_works) + call assert_equal(77, g:plugin_also_works) call assert_equal(17, g:ftdetect_works) call assert_true(len(&rtp) > len(rtp)) call assert_true(&rtp =~ 'testdir/Xdir/pack/mine/opt/mytest\($\|,\)') *** ../vim-7.4.1698/src/version.c 2016-04-02 22:24:15.304417512 +0200 --- src/version.c 2016-04-02 22:35:04.877755652 +0200 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1699, /**/ -- panic("Foooooooood fight!"); -- In the kernel source aha1542.c, after detecting a bad segment list /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///