summaryrefslogtreecommitdiffstats
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-26 16:48:44 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-26 16:48:44 +0200
commit6a0cc916bd3cd6c2fd88b2972c92ade225603229 (patch)
tree61d7a66bccf78d9a0a62b316060f3e4896291f5f /src/quickfix.c
parent28ed4dfe1f80905fb399c2cde31ace5ee14d8c67 (diff)
patch 8.1.2220: :cfile does not abort like other quickfix commandsv8.1.2220
Problem: :cfile does not abort like other quickfix commands. Solution: Abort when desired. Add tests for aborting. (Yegappan Lakshmanan, closes #5121)
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 067dbffd08..7b64f45640 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -5509,8 +5509,14 @@ ex_cfile(exarg_T *eap)
int res;
au_name = cfile_get_auname(eap->cmdidx);
- if (au_name != NULL)
- apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name, NULL, FALSE, curbuf);
+ if (au_name != NULL && apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+ NULL, FALSE, curbuf))
+ {
+#ifdef FEAT_EVAL
+ if (aborting())
+ return;
+#endif
+ }
enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc;
#ifdef FEAT_BROWSE