mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user