diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2015-07-02 21:21:53 -0300 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-07-14 14:25:54 -0400 |
commit | 59784b91dbf97388281c1eb6989e2e770eb7ecac (patch) | |
tree | 56d0dce9dc2a30a391324caa6e005a101d88d9ac /src | |
parent | 9a72f6b955a5cbe493766bac34af2cf52ae988e9 (diff) | |
download | rneovim-59784b91dbf97388281c1eb6989e2e770eb7ecac.tar.gz rneovim-59784b91dbf97388281c1eb6989e2e770eb7ecac.tar.bz2 rneovim-59784b91dbf97388281c1eb6989e2e770eb7ecac.zip |
vim-patch:7.4.688 #2941
```
updated for version 7.4.668
Problem: Can't use a glob pattern as a regexp pattern.
Solution: Add glob2regpat(). (Christian Brabandt)
```
https://code.google.com/p/vim/source/detail?r=v7-4-668
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 12 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d3ab47a505..7da5cfb731 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -6512,6 +6512,7 @@ static struct fst { {"getwinposy", 0, 0, f_getwinposy}, {"getwinvar", 2, 3, f_getwinvar}, {"glob", 1, 3, f_glob}, + {"glob2regpat", 1, 1, f_glob2regpat}, {"globpath", 2, 4, f_globpath}, {"has", 1, 1, f_has}, {"has_key", 2, 2, f_has_key}, @@ -9894,6 +9895,17 @@ static void f_globpath(typval_T *argvars, typval_T *rettv) } /* + * "glob2regpat()" function + */ +static void f_glob2regpat(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 f_has(typval_T *argvars, typval_T *rettv) diff --git a/src/nvim/version.c b/src/nvim/version.c index 930048af6e..c7523bbdc7 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -181,7 +181,7 @@ static int included_patches[] = { //671, //670, //669 NA - //668, + 668, //667, //666 NA //665, |