0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-10-26 16:48:44 +02:00
parent 28ed4dfe1f
commit 6a0cc916bd
3 changed files with 101 additions and 3 deletions

View File

@@ -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