Mercurial > vim
comparison src/ex_docmd.c @ 10575:01a5f64a7a20 v8.0.0177
patch 8.0.0177: BufEnter autocommand not fired for a directory
commit https://github.com/vim/vim/commit/e13b9afe1283f5ae43232b5992372a0eb570666c
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 13 22:01:02 2017 +0100
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 13 Jan 2017 22:15:03 +0100 |
parents | 4b152b5f414f |
children | 4762bd300564 |
comparison
equal
deleted
inserted
replaced
10574:7eaa92b1da91 | 10575:01a5f64a7a20 |
---|---|
8855 (void)setaltfname(eap->arg, eap->arg, (linenr_T)1); | 8855 (void)setaltfname(eap->arg, eap->arg, (linenr_T)1); |
8856 i = readfile(eap->arg, NULL, | 8856 i = readfile(eap->arg, NULL, |
8857 eap->line2, (linenr_T)0, (linenr_T)MAXLNUM, eap, 0); | 8857 eap->line2, (linenr_T)0, (linenr_T)MAXLNUM, eap, 0); |
8858 | 8858 |
8859 } | 8859 } |
8860 if (i == FAIL) | 8860 if (i != OK) |
8861 { | 8861 { |
8862 #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL) | 8862 #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL) |
8863 if (!aborting()) | 8863 if (!aborting()) |
8864 #endif | 8864 #endif |
8865 EMSG2(_(e_notopen), eap->arg); | 8865 EMSG2(_(e_notopen), eap->arg); |