patch 9.0.0275: BufEnter not triggered when using ":edit" in "nofile" buffer
Problem: BufEnter not triggered when using ":edit" in "nofile" buffer.
Solution: Let readfile() return NOTDONE. (closes #10986)
diff --git a/src/fileio.c b/src/fileio.c
index 1b30e0f..8437b2b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -312,7 +312,7 @@
curbuf->b_op_start = orig_start;
if (flags & READ_NOFILE)
- return FAIL;
+ return NOTDONE; // so that BufEnter can be triggered
}
if ((shortmess(SHM_OVER) || curbuf->b_help) && p_verbose == 0)