aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-07-22 15:24:56 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-07-22 15:24:56 -0400
commitba04a1c30674523fb7880b3003d8087ed7852cd9 (patch)
treebd9347f6efe81084eb4b703f6f5b6bbbaccffdc4 /src/nvim/quickfix.c
parent845d1bfa905cf0d28d9a1a662e42525449dd1be4 (diff)
parent7a2ea275eb5964f4a9b875ca273068fb9b40c81d (diff)
downloadrneovim-ba04a1c30674523fb7880b3003d8087ed7852cd9.tar.gz
rneovim-ba04a1c30674523fb7880b3003d8087ed7852cd9.tar.bz2
rneovim-ba04a1c30674523fb7880b3003d8087ed7852cd9.zip
Merge pull request #904 from war1025/dev/buffer_tests
Add unit tests for buffer.c and fileio.c
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index ff2123bac1..2415858e0f 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -3540,7 +3540,11 @@ void ex_helpgrep(exarg_T *eap)
/* Find all "*.txt" and "*.??x" files in the "doc" directory. */
add_pathsep(NameBuff);
STRCAT(NameBuff, "doc/*.\\(txt\\|??x\\)");
- if (gen_expand_wildcards(1, &NameBuff, &fcount,
+
+ // Note: We cannot just do `&NameBuff` because it is a statically sized array
+ // so `NameBuff == &NameBuff` according to C semantics.
+ char_u *buff_list[1] = {(char_u*) NameBuff};
+ if (gen_expand_wildcards(1, buff_list, &fcount,
&fnames, EW_FILE|EW_SILENT) == OK
&& fcount > 0) {
for (fi = 0; fi < fcount && !got_int; ++fi) {