summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-09-01 20:46:49 +0000
committerBram Moolenaar <Bram@vim.org>2005-09-01 20:46:49 +0000
commite344bead3ecc16a0982d157e8c19050f6dff4e0c (patch)
tree34da48120172b9e2efc8c559733c2b69db5a24ba /src/quickfix.c
parentda2303d96b0f55d30e9b5b57d3459d5e1ea22ec2 (diff)
downloadvim-git-e344bead3ecc16a0982d157e8c19050f6dff4e0c.tar.gz
updated for version 7.0140v7.0140
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index bf0b0b8c6..d595c4f5e 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -187,7 +187,7 @@ qf_init_ext(efile, buf, tv, errorformat, newlist, lnumfirst, lnumlast)
char *pattern;
} fmt_pat[FMT_PATTERNS] =
{
- {'f', "\\f\\+"},
+ {'f', ".\\+"}, /* only used when at end */
{'n', "\\d\\+"},
{'l', "\\d\\+"},
{'c', "\\d\\+"},
@@ -319,16 +319,25 @@ qf_init_ext(efile, buf, tv, errorformat, newlist, lnumfirst, lnumlast)
ptr += 10;
}
#endif
- if (*efmp == 'f' && efmp[1] != NUL
- && efmp[1] != '\\' && efmp[1] != '%')
+ if (*efmp == 'f' && efmp[1] != NUL)
{
- /* A file name may contain spaces, but this isn't in
- * "\f". For "%f:%l:%m" there may be a ":" in the
- * file name. Use ".\{-1,}x" instead (x is the next
- * character), the requirement that :999: follows
- * should work. */
- STRCPY(ptr, ".\\{-1,}");
- ptr += 7;
+ if (efmp[1] != '\\' && efmp[1] != '%')
+ {
+ /* A file name may contain spaces, but this isn't
+ * in "\f". For "%f:%l:%m" there may be a ":" in
+ * the file name. Use ".\{-1,}x" instead (x is
+ * the next character), the requirement that :999:
+ * follows should work. */
+ STRCPY(ptr, ".\\{-1,}");
+ ptr += 7;
+ }
+ else
+ {
+ /* File name followed by '\\' or '%': include as
+ * many file name chars as possible. */
+ STRCPY(ptr, "\\f\\+");
+ ptr += 4;
+ }
}
else
{