aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-28 19:29:59 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-02-28 19:52:45 +0800
commit7aad75e293e3a01e292308ca2058e35083b83280 (patch)
tree7198c028ad1b012b9b0710d697df0b3ea95fd76d /runtime
parent4bd0611d7b07b56fc5a9e121669a313166ba540f (diff)
downloadrneovim-7aad75e293e3a01e292308ca2058e35083b83280.tar.gz
rneovim-7aad75e293e3a01e292308ca2058e35083b83280.tar.bz2
rneovim-7aad75e293e3a01e292308ca2058e35083b83280.zip
vim-patch:9.0.0810: readblob() returns empty when trying to read too much
Problem: readblob() returns empty when trying to read too much. Solution: Return what is available. https://github.com/vim/vim/commit/5b2a3d77d320d76f12b1666938a9d58c2a848205 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/builtin.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index eab415f495..568b73ddfa 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -6171,8 +6171,10 @@ readblob({fname} [, {offset} [, {size}]]) *readblob()*
readblob('/dev/ttyS0', 0, 10)
< When the file can't be opened an error message is given and
the result is an empty |Blob|.
- When trying to read bytes beyond the end of the file the
- result is an empty blob.
+ When the offset is beyond the end of the file the result is an
+ empty blob.
+ When trying to read more bytes than are available the result
+ is truncated.
Also see |readfile()| and |writefile()|.