diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-25 20:23:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 20:23:29 +0800 |
commit | cd2d3aa48f3531103a3a355d76394301e7b074df (patch) | |
tree | c8e64d07f9fbe43a1ded6c6ec0d10fdfdecbc59e /runtime/doc | |
parent | 1b29288709e75064b9188420d46e1028d7ee341e (diff) | |
download | rneovim-cd2d3aa48f3531103a3a355d76394301e7b074df.tar.gz rneovim-cd2d3aa48f3531103a3a355d76394301e7b074df.tar.bz2 rneovim-cd2d3aa48f3531103a3a355d76394301e7b074df.zip |
vim-patch:9.0.0261: bufload() reads a file even if the name is not a file name (#19944)
Problem: bufload() reads a file even if the name is not a file name. (Cyker
Way)
Solution: Do not read the file when the buffer name is not a file name.
(closes vim/vim#10975)
https://github.com/vim/vim/commit/2eddbacd6dc17c84e4bdc41e60e81949a36bb973
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/builtin.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index f99da3443e..8929804388 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -784,7 +784,8 @@ browsedir({title}, {initdir}) browsing is not possible, an empty string is returned. bufadd({name}) *bufadd()* - Add a buffer to the buffer list with String {name}. + Add a buffer to the buffer list with name {name} (must be a + String). If a buffer for file {name} already exists, return that buffer number. Otherwise return the buffer number of the newly created buffer. When {name} is an empty string then a new @@ -835,7 +836,8 @@ bufload({buf}) *bufload()* Ensure the buffer {buf} is loaded. When the buffer name refers to an existing file then the file is read. Otherwise the buffer will be empty. If the buffer was already loaded - then there is no change. + then there is no change. If the buffer is not related to a + file the no file is read (e.g., when 'buftype' is "nofile"). If there is an existing swap file for the file of the buffer, there will be no dialog, the buffer will be loaded anyway. The {buf} argument is used like with |bufexists()|. |