Mercurial > vim
diff src/quickfix.c @ 18452:0ac9e720a56e v8.1.2220
patch 8.1.2220: :cfile does not abort like other quickfix commands
Commit: https://github.com/vim/vim/commit/6a0cc916bd3cd6c2fd88b2972c92ade225603229
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 26 16:48:44 2019 +0200
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Oct 2019 17:00:03 +0200 |
parents | 34d5cd432cac |
children | 9e6d5a4abb1c |
line wrap: on
line diff
--- 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