aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/fileio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 0b66878103..39b4eb4376 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -337,7 +337,9 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
curbuf->b_op_start = orig_start;
if (flags & READ_NOFILE) {
- return NOTDONE; // so that BufEnter can be triggered
+ // Return NOTDONE instead of FAIL so that BufEnter can be triggered
+ // and other operations don't fail.
+ return NOTDONE;
}
}