aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-27 06:32:41 +0800
committerGitHub <noreply@github.com>2022-08-27 06:32:41 +0800
commitd5e08837128530f05b2fc8900e826f767e4961ee (patch)
treeb32ca8de44a1e8fd4507d3b5402e055b1eadbb96 /src/nvim/fileio.c
parentb0e052a8b30ce84221c3f992e111713451633b36 (diff)
parentd813ef0097eb781baeba5d458dcb0507e2f61040 (diff)
downloadrneovim-d5e08837128530f05b2fc8900e826f767e4961ee.tar.gz
rneovim-d5e08837128530f05b2fc8900e826f767e4961ee.tar.bz2
rneovim-d5e08837128530f05b2fc8900e826f767e4961ee.zip
Merge pull request #19955 from zeertzjq/vim-9.0.0272
vim-patch:9.0.{0272,0274,0275,0276}: buffer loading fixes
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 21c1549f42..0b66878103 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -167,6 +167,7 @@ void filemess(buf_T *buf, char_u *name, char_u *s, int attr)
/// READ_STDIN read from stdin instead of a file
/// READ_BUFFER read from curbuf instead of a file (converting after reading
/// stdin)
+/// READ_NOFILE do not read a file, only trigger BufReadCmd
/// READ_DUMMY read into a dummy buffer (to check if file contents changed)
/// READ_KEEP_UNDO don't clear undo info or read it from a file
/// READ_FIFO read from fifo/socket instead of a file
@@ -334,6 +335,10 @@ 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
+ }
}
if ((shortmess(SHM_OVER) || curbuf->b_help) && p_verbose == 0) {