aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2018-07-27 10:06:46 -0400
committerGitHub <noreply@github.com>2018-07-27 10:06:46 -0400
commite42688fcf38013f9c4eef8f97f92e686a858ffad (patch)
tree73b3f1787ab7b92479508fa24bbf99debc52fd87 /src/nvim/quickfix.c
parent5f15788dc3ac1ea7906673eacc9cf9bdb1f14212 (diff)
parent6285b518d4c56537991feff899b74274766086ca (diff)
downloadrneovim-e42688fcf38013f9c4eef8f97f92e686a858ffad.tar.gz
rneovim-e42688fcf38013f9c4eef8f97f92e686a858ffad.tar.bz2
rneovim-e42688fcf38013f9c4eef8f97f92e686a858ffad.zip
Merge pull request #8769 from janlazo/vim-8.0.1502
[RDY] vim-patch:8.0.{1502,1512,1622}
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 47760e1e70..664dd3e968 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -3603,15 +3603,16 @@ void ex_vimgrep(exarg_T *eap)
goto theend;
}
- if (s != NULL && *s == NUL) {
- /* Pattern is empty, use last search pattern. */
+ if (s == NULL || *s == NUL) {
+ // Pattern is empty, use last search pattern.
if (last_search_pat() == NULL) {
EMSG(_(e_noprevre));
goto theend;
}
regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
- } else
+ } else {
regmatch.regprog = vim_regcomp(s, RE_MAGIC);
+ }
if (regmatch.regprog == NULL)
goto theend;