aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 5cf2f4d5a7..a37a41caeb 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -561,7 +561,9 @@ restofline:
tail = NULL;
regmatch.regprog = fmt_ptr->prog;
- if (vim_regexec(&regmatch, IObuff, (colnr_T)0)) {
+ int r = vim_regexec(&regmatch, IObuff, (colnr_T)0);
+ fmt_ptr->prog = regmatch.regprog;
+ if (r) {
if ((idx == 'C' || idx == 'Z') && !multiline)
continue;
if (vim_strchr((char_u *)"EWI", idx) != NULL)