diff options
-rw-r--r-- | src/eval.c | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index cb584f8b8e..7aefdb58fd 100644 --- a/src/eval.c +++ b/src/eval.c @@ -575,6 +575,7 @@ static void f_getwinposy __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getwinvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_glob __ARGS((typval_T *argvars, typval_T *rettv)); static void f_globpath __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_glob2regpat __ARGS((typval_T *argvars, typval_T *rettv)); static void f_has __ARGS((typval_T *argvars, typval_T *rettv)); static void f_has_key __ARGS((typval_T *argvars, typval_T *rettv)); static void f_haslocaldir __ARGS((typval_T *argvars, typval_T *rettv)); @@ -8142,6 +8143,7 @@ static struct fst {"getwinposy", 0, 0, f_getwinposy}, {"getwinvar", 2, 3, f_getwinvar}, {"glob", 1, 4, f_glob}, + {"glob2regpat", 1, 1, f_glob2regpat}, {"globpath", 2, 5, f_globpath}, {"has", 1, 1, f_has}, {"has_key", 2, 2, f_has_key}, @@ -12500,6 +12502,20 @@ f_globpath(argvars, rettv) } /* + * "glob2regpat()" function + */ + static void +f_glob2regpat(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + char_u *pat = get_tv_string_chk(&argvars[0]); + + rettv->v_type = VAR_STRING; + rettv->vval.v_string = file_pat_to_reg_pat(pat, NULL, NULL, FALSE); +} + +/* * "has()" function */ static void diff --git a/src/version.c b/src/version.c index c721e0784c..c5e8a152a8 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 668, +/**/ 667, /**/ 666, |