patch 8.1.2220: :cfile does not abort like other quickfix commands
Problem: :cfile does not abort like other quickfix commands.
Solution: Abort when desired. Add tests for aborting. (Yegappan Lakshmanan,
closes #5121)
diff --git a/src/quickfix.c b/src/quickfix.c
index 067dbff..7b64f45 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -5509,8 +5509,14 @@
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