summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-21 15:00:03 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-21 15:00:03 +0200
commitdd1248143e56b1450903fe40813e40c63691b071 (patch)
tree0fe93145d7b7390dbf9b0ef2f238d947dc9ee18a /src
parent843b884461de1c79a1d2748549776fb13fc94360 (diff)
patch 7.4.2234v7.4.2234
Problem: Can't build with +eval but without +quickfix. (John Marriott) Solution: Move skip_vimgrep_pat() to separate #ifdef block.
Diffstat (limited to 'src')
-rw-r--r--src/quickfix.c106
-rw-r--r--src/version.c2
2 files changed, 56 insertions, 52 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 2fa6ed98a9..1995c62729 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4319,58 +4319,6 @@ theend:
}
/*
- * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
- * Put the start of the pattern in "*s", unless "s" is NULL.
- * If "flags" is not NULL put the flags in it: VGR_GLOBAL, VGR_NOJUMP.
- * If "s" is not NULL terminate the pattern with a NUL.
- * Return a pointer to the char just past the pattern plus flags.
- */
- char_u *
-skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
-{
- int c;
-
- if (vim_isIDc(*p))
- {
- /* ":vimgrep pattern fname" */
- if (s != NULL)
- *s = p;
- p = skiptowhite(p);
- if (s != NULL && *p != NUL)
- *p++ = NUL;
- }
- else
- {
- /* ":vimgrep /pattern/[g][j] fname" */
- if (s != NULL)
- *s = p + 1;
- c = *p;
- p = skip_regexp(p + 1, c, TRUE, NULL);
- if (*p != c)
- return NULL;
-
- /* Truncate the pattern. */
- if (s != NULL)
- *p = NUL;
- ++p;
-
- /* Find the flags */
- while (*p == 'g' || *p == 'j')
- {
- if (flags != NULL)
- {
- if (*p == 'g')
- *flags |= VGR_GLOBAL;
- else
- *flags |= VGR_NOJUMP;
- }
- ++p;
- }
- }
- return p;
-}
-
-/*
* Restore current working directory to "dirname_start" if they differ, taking
* into account whether it is set locally or globally.
*/
@@ -5207,3 +5155,57 @@ ex_helpgrep(exarg_T *eap)
}
#endif /* FEAT_QUICKFIX */
+
+#if defined(FEAT_QUICKFIX) || defined(FEAT_EVAL) || defined(PROTO)
+/*
+ * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
+ * Put the start of the pattern in "*s", unless "s" is NULL.
+ * If "flags" is not NULL put the flags in it: VGR_GLOBAL, VGR_NOJUMP.
+ * If "s" is not NULL terminate the pattern with a NUL.
+ * Return a pointer to the char just past the pattern plus flags.
+ */
+ char_u *
+skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
+{
+ int c;
+
+ if (vim_isIDc(*p))
+ {
+ /* ":vimgrep pattern fname" */
+ if (s != NULL)
+ *s = p;
+ p = skiptowhite(p);
+ if (s != NULL && *p != NUL)
+ *p++ = NUL;
+ }
+ else
+ {
+ /* ":vimgrep /pattern/[g][j] fname" */
+ if (s != NULL)
+ *s = p + 1;
+ c = *p;
+ p = skip_regexp(p + 1, c, TRUE, NULL);
+ if (*p != c)
+ return NULL;
+
+ /* Truncate the pattern. */
+ if (s != NULL)
+ *p = NUL;
+ ++p;
+
+ /* Find the flags */
+ while (*p == 'g' || *p == 'j')
+ {
+ if (flags != NULL)
+ {
+ if (*p == 'g')
+ *flags |= VGR_GLOBAL;
+ else
+ *flags |= VGR_NOJUMP;
+ }
+ ++p;
+ }
+ }
+ return p;
+}
+#endif
diff --git a/src/version.c b/src/version.c
index 0ab89edd8f..e9ce5971ea 100644
--- a/src/version.c
+++ b/src/version.c
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2234,
+/**/
2233,
/**/
2232,