aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-26 20:18:02 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-27 06:12:52 +0800
commit45c23a757c6fc601a76a92f052f55eb3ed469364 (patch)
tree4e19c885a0103b1232685f735c666f49e3909b43 /src/nvim/fileio.c
parent52f00a6c4d84a13a85ff265a5c59c92795d1b333 (diff)
downloadrneovim-45c23a757c6fc601a76a92f052f55eb3ed469364.tar.gz
rneovim-45c23a757c6fc601a76a92f052f55eb3ed469364.tar.bz2
rneovim-45c23a757c6fc601a76a92f052f55eb3ed469364.zip
vim-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 vim/vim#10986) https://github.com/vim/vim/commit/a9b5b85068b2fcb1c01ea20524e227bcad579ceb
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index fdba186200..0b66878103 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -337,7 +337,7 @@ 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 FAIL;
+ return NOTDONE; // so that BufEnter can be triggered
}
}