To: vim_dev@googlegroups.com Subject: Patch 8.2.4275 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4275 Problem: Cannot use an autoload function from a package under start. Solution: Also look in the "start" package directory. (Bjorn Linse, closes #7193) Files: src/scriptfile.c, src/testdir/test_packadd.vim *** ../vim-8.2.4274/src/scriptfile.c 2022-01-20 19:10:20.498583720 +0000 --- src/scriptfile.c 2022-01-31 17:21:00.446433102 +0000 *************** *** 2294,2300 **** // Try loading the package from $VIMRUNTIME/autoload/.vim // Use "ret_sid" to avoid loading the same script again. ! if (source_in_path(p_rtp, scriptname, 0, &ret_sid) == OK) ret = TRUE; } --- 2294,2300 ---- // Try loading the package from $VIMRUNTIME/autoload/.vim // Use "ret_sid" to avoid loading the same script again. ! if (source_in_path(p_rtp, scriptname, DIP_START, &ret_sid) == OK) ret = TRUE; } *** ../vim-8.2.4274/src/testdir/test_packadd.vim 2020-08-12 17:50:31.883655785 +0100 --- src/testdir/test_packadd.vim 2022-01-31 17:24:22.683505727 +0000 *************** *** 246,251 **** --- 246,264 ---- call assert_equal(4321, g:plugin_bar_number) endfunc + func Test_start_autoload() + " plugin foo with an autoload directory + let autodir = &packpath .. '/pack/mine/start/foo/autoload' + call mkdir(autodir, 'p') + let fname = autodir .. '/foobar.vim' + call writefile(['func foobar#test()', + \ ' return 1666', + \ 'endfunc'], fname) + + call assert_equal(1666, foobar#test()) + call delete(fname) + endfunc + func Test_helptags() let docdir1 = &packpath . '/pack/mine/start/foo/doc' let docdir2 = &packpath . '/pack/mine/start/bar/doc' *** ../vim-8.2.4274/src/version.c 2022-01-31 17:08:05.653352132 +0000 --- src/version.c 2022-01-31 17:25:05.434884963 +0000 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4275, /**/ -- This computer is so slow, it takes forever to execute and endless loop! /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///