mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.3.1163
Problem: Not easy to load Python modules. Solution: Search "python2", "python3" and "pythonx" directories in 'runtimepath' for Python modules. (ZyX)
This commit is contained in:
@@ -2737,6 +2737,10 @@ source_runtime(name, all)
|
||||
* When "all" is TRUE repeat for all matches, otherwise only the first one is
|
||||
* used.
|
||||
* Returns OK when at least one match found, FAIL otherwise.
|
||||
*
|
||||
* If "name" is NULL calls callback for each entry in runtimepath. Cookie is
|
||||
* passed by reference in this case, setting it to NULL indicates that callback
|
||||
* has done its job.
|
||||
*/
|
||||
int
|
||||
do_in_runtimepath(name, all, callback, cookie)
|
||||
@@ -2768,7 +2772,7 @@ do_in_runtimepath(name, all, callback, cookie)
|
||||
buf = alloc(MAXPATHL);
|
||||
if (buf != NULL && rtp_copy != NULL)
|
||||
{
|
||||
if (p_verbose > 1)
|
||||
if (p_verbose > 1 && name != NULL)
|
||||
{
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Searching for \"%s\" in \"%s\""),
|
||||
@@ -2782,7 +2786,13 @@ do_in_runtimepath(name, all, callback, cookie)
|
||||
{
|
||||
/* Copy the path from 'runtimepath' to buf[]. */
|
||||
copy_option_part(&rtp, buf, MAXPATHL, ",");
|
||||
if (STRLEN(buf) + STRLEN(name) + 2 < MAXPATHL)
|
||||
if (name == NULL)
|
||||
{
|
||||
(*callback)(buf, (void *) &cookie);
|
||||
if (!did_one)
|
||||
did_one = (cookie == NULL);
|
||||
}
|
||||
else if (STRLEN(buf) + STRLEN(name) + 2 < MAXPATHL)
|
||||
{
|
||||
add_pathsep(buf);
|
||||
tail = buf + STRLEN(buf);
|
||||
@@ -2821,7 +2831,7 @@ do_in_runtimepath(name, all, callback, cookie)
|
||||
}
|
||||
vim_free(buf);
|
||||
vim_free(rtp_copy);
|
||||
if (p_verbose > 0 && !did_one)
|
||||
if (p_verbose > 0 && !did_one && name != NULL)
|
||||
{
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("not found in 'runtimepath': \"%s\""), name);
|
||||
|
Reference in New Issue
Block a user