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/<name>.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/<name>.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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220131172739.E41931C1918%40moolenaar.net.

Raspunde prin e-mail lui