From e13b9afe1283f5ae43232b5992372a0eb570666c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 13 Jan 2017 22:01:02 +0100 Subject: patch 8.0.0177: BufEnter autocommand not fired for a directory Problem: When opening a buffer on a directory and inside a try/catch then the BufEnter event is not triggered. Solution: Return NOTDONE from readfile() for a directory and deal with the three possible return values. (Justin M. Keyes, closes #1375, closes #1353) --- src/ex_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ex_cmds.c') diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 484a22c74..00cac9256 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -1313,7 +1313,7 @@ do_filter( if (otmp != NULL) { if (readfile(otmp, NULL, line2, (linenr_T)0, (linenr_T)MAXLNUM, - eap, READ_FILTER) == FAIL) + eap, READ_FILTER) != OK) { #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL) if (!aborting()) -- cgit v1.2.1