aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-07-29 17:46:45 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-16 00:14:47 +0100
commite53b71627fb84025fb658a44ee5f90adf276cde7 (patch)
tree8f4a392aeebf677009cb8ba479016efbb201389d /runtime
parentddaa0cc9bebd8e094a7169f43947f298a3436ba9 (diff)
downloadrneovim-e53b71627fb84025fb658a44ee5f90adf276cde7.tar.gz
rneovim-e53b71627fb84025fb658a44ee5f90adf276cde7.tar.bz2
rneovim-e53b71627fb84025fb658a44ee5f90adf276cde7.zip
feat(f_msgpackparse): support parsing from Blob
Note that it is not possible for msgpack_unpack_next() and msgpack_unpacker_next() to return MSGPACK_UNPACK_EXTRA_BYTES, so it should be fine to abort() on that. Lua 5.1 doesn't support string hex escapes (\xXX) like VimL does (though LuaJIT does), so convert them to decimal escapes (\DDD) in tests.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 013bff3d20..93826660b1 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2535,7 +2535,7 @@ mkdir({name} [, {path} [, {prot}]])
Number create directory {name}
mode([expr]) String current editing mode
msgpackdump({list} [, {type}]) List/Blob dump objects to msgpack
-msgpackparse({list}) List parse msgpack to a list of objects
+msgpackparse({data}) List parse msgpack to a list of objects
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
nvim_...({args}...) any call nvim |api| functions
@@ -6843,8 +6843,9 @@ msgpackdump({list} [, {type}]) *msgpackdump()*
4. Other strings and |Blob|s are always dumped as BIN strings.
5. Points 3. and 4. do not apply to |msgpack-special-dict|s.
-msgpackparse({list}) *msgpackparse()*
- Convert a |readfile()|-style list to a list of VimL objects.
+msgpackparse({data}) *msgpackparse()*
+ Convert a |readfile()|-style list or a |Blob| to a list of
+ VimL objects.
Example: >
let fname = expand('~/.config/nvim/shada/main.shada')
let mpack = readfile(fname, 'b')