summaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-13 22:01:02 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-13 22:01:02 +0100
commite13b9afe1283f5ae43232b5992372a0eb570666c (patch)
treebd533d936ffe99f5791dc6f2f9284d980a88633d /src/memline.c
parent70bcd7336f9f19304f32c52a86ed5b4b3de852c2 (diff)
downloadvim-git-e13b9afe1283f5ae43232b5992372a0eb570666c.tar.gz
patch 8.0.0177: BufEnter autocommand not fired for a directoryv8.0.0177
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)
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memline.c b/src/memline.c
index e3a4bdbc6..244e69277 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1519,7 +1519,7 @@ ml_recover(void)
line_count = pp->pb_pointer[idx].pe_line_count;
if (readfile(curbuf->b_ffname, NULL, lnum,
pp->pb_pointer[idx].pe_old_lnum - 1,
- line_count, NULL, 0) == FAIL)
+ line_count, NULL, 0) != OK)
cannot_open = TRUE;
else
lnum += line_count;