diff options
-rw-r--r-- | src/nvim/ex_cmds2.c | 4 | ||||
-rw-r--r-- | src/nvim/quickfix.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index c400975108..e49bb99aa0 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -1639,10 +1639,10 @@ int get_arglist_exp(char_u *str, int *fcountp, char_u ***fnamesp, bool wig) if (wig) { i = expand_wildcards(ga.ga_len, (char_u **)ga.ga_data, - fcountp, fnamesp, EW_FILE|EW_NOTFOUND); + fcountp, fnamesp, EW_FILE|EW_NOTFOUND|EW_NOTWILD); } else { i = gen_expand_wildcards(ga.ga_len, (char_u **)ga.ga_data, - fcountp, fnamesp, EW_FILE|EW_NOTFOUND); + fcountp, fnamesp, EW_FILE|EW_NOTFOUND|EW_NOTWILD); } ga_clear(&ga); diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index a625c09f78..3d639d7db5 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -5264,7 +5264,7 @@ void ex_vimgrep(exarg_T *eap) qf_new_list(qi, title); } - // parse the list of arguments + // Parse the list of arguments, wildcards have already been expanded. if (get_arglist_exp(p, &fcount, &fnames, true) == FAIL) { goto theend; } diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 00a253a215..704fdacdcd 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -2650,6 +2650,13 @@ func Test_vimgrep() call XvimgrepTests('l') endfunc +func Test_vimgrep_wildcards_expanded_once() + new X[id-01] file.txt + call setline(1, 'some text to search for') + vimgrep text % + bwipe! +endfunc + " Test for incsearch highlighting of the :vimgrep pattern " This test used to cause "E315: ml_get: invalid lnum" errors. func Test_vimgrep_incsearch() |