Skip to content

Commit f02c28d

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 93e61c8 + e6bf655 commit f02c28d

22 files changed

+751
-543
lines changed

src/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,8 +2106,8 @@ test1 \
21062106
test50 test51 test52 test53 test54 test55 test56 test57 test59 \
21072107
test60 test64 test66 test67 test68 test69 \
21082108
test70 test72 test73 test74 test75 test77 test78 test79 \
2109-
test80 test82 test83 test84 test85 test86 test87 test88 \
2110-
test90 test91 test94 test95 test97 test98 test99 \
2109+
test80 test83 test84 test85 test86 test87 test88 \
2110+
test91 test94 test95 test97 test98 test99 \
21112111
test100 test101 test103 test104 test107 test108:
21122112
cd testdir; rm -f [email protected]; $(MAKE) -f Makefile [email protected] VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
21132113

@@ -2224,6 +2224,7 @@ test_arglist \
22242224
test_search \
22252225
test_searchpos \
22262226
test_set \
2227+
test_sha256 \
22272228
test_signs \
22282229
test_smartindent \
22292230
test_sort \
@@ -2250,6 +2251,7 @@ test_arglist \
22502251
test_unlet \
22512252
test_usercommands \
22522253
test_utf8 \
2254+
test_utf8_comparisons \
22532255
test_viminfo \
22542256
test_vimscript \
22552257
test_visual \

src/ex_cmds2.c

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3358,19 +3358,6 @@ source_callback(char_u *fname, void *cookie UNUSED)
33583358
(void)do_source(fname, FALSE, DOSO_NONE);
33593359
}
33603360

3361-
/*
3362-
* Source the file "name" from all directories in 'runtimepath'.
3363-
* "name" can contain wildcards.
3364-
* When "flags" has DIP_ALL: source all files, otherwise only the first one.
3365-
*
3366-
* return FAIL when no file could be sourced, OK otherwise.
3367-
*/
3368-
int
3369-
source_runtime(char_u *name, int flags)
3370-
{
3371-
return do_in_runtimepath(name, flags, source_callback, NULL);
3372-
}
3373-
33743361
/*
33753362
* Find the file "name" in all directories in "path" and invoke
33763363
* "callback(fname, cookie)".
@@ -3508,18 +3495,19 @@ do_in_path(
35083495
}
35093496

35103497
/*
3511-
* Find "name" in 'runtimepath'. When found, invoke the callback function for
3498+
* Find "name" in "path". When found, invoke the callback function for
35123499
* it: callback(fname, "cookie")
35133500
* When "flags" has DIP_ALL repeat for all matches, otherwise only the first
35143501
* one is used.
35153502
* Returns OK when at least one match found, FAIL otherwise.
35163503
*
3517-
* If "name" is NULL calls callback for each entry in runtimepath. Cookie is
3504+
* If "name" is NULL calls callback for each entry in "path". Cookie is
35183505
* passed by reference in this case, setting it to NULL indicates that callback
35193506
* has done its job.
35203507
*/
3521-
int
3522-
do_in_runtimepath(
3508+
static int
3509+
do_in_path_and_pp(
3510+
char_u *path,
35233511
char_u *name,
35243512
int flags,
35253513
void (*callback)(char_u *fname, void *ck),
@@ -3532,7 +3520,7 @@ do_in_runtimepath(
35323520
char *opt_dir = "pack/*/opt/*/%s";
35333521

35343522
if ((flags & DIP_NORTP) == 0)
3535-
done = do_in_path(p_rtp, name, flags, callback, cookie);
3523+
done = do_in_path(path, name, flags, callback, cookie);
35363524

35373525
if ((done == FAIL || (flags & DIP_ALL)) && (flags & DIP_START))
35383526
{
@@ -3559,6 +3547,42 @@ do_in_runtimepath(
35593547
return done;
35603548
}
35613549

3550+
/*
3551+
* Just like do_in_path_and_pp(), using 'runtimepath' for "path".
3552+
*/
3553+
int
3554+
do_in_runtimepath(
3555+
char_u *name,
3556+
int flags,
3557+
void (*callback)(char_u *fname, void *ck),
3558+
void *cookie)
3559+
{
3560+
return do_in_path_and_pp(p_rtp, name, flags, callback, cookie);
3561+
}
3562+
3563+
/*
3564+
* Source the file "name" from all directories in 'runtimepath'.
3565+
* "name" can contain wildcards.
3566+
* When "flags" has DIP_ALL: source all files, otherwise only the first one.
3567+
*
3568+
* return FAIL when no file could be sourced, OK otherwise.
3569+
*/
3570+
int
3571+
source_runtime(char_u *name, int flags)
3572+
{
3573+
return source_in_path(p_rtp, name, flags);
3574+
}
3575+
3576+
/*
3577+
* Just like source_runtime(), but use "path" instead of 'runtimepath'.
3578+
*/
3579+
int
3580+
source_in_path(char_u *path, char_u *name, int flags)
3581+
{
3582+
return do_in_path_and_pp(path, name, flags, source_callback, NULL);
3583+
}
3584+
3585+
35623586
/*
35633587
* Expand wildcards in "pat" and invoke do_source() for each match.
35643588
*/

0 commit comments

Comments
 (0)