diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 1ce6b0b247..e019e8fcab 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -796,6 +796,8 @@ M.funcs = { with a listed buffer, that one is returned. Next unlisted buffers are searched for. If the {buf} is a String, but you want to use it as a buffer + number, force it to be a Number by adding zero to it: >vim + echo bufname("3" + 0) <If the buffer doesn't exist, or doesn't have a name, an empty string is returned. >vim echo bufname("#") " alternate buffer name @@ -5413,6 +5415,9 @@ M.funcs = { base = 1, desc = [=[ Bitwise invert. The argument is converted to a number. A + List, Dict or Float argument causes an error. Example: >vim + let bits = invert(bits) + < ]=], name = 'invert', params = { { 'expr', 'any' } }, @@ -8150,6 +8155,9 @@ M.funcs = { {object} can be a |List| or a |Blob|. Returns {object}. Returns zero if {object} is not a List or a Blob. + If you want an object to remain unmodified make a copy first: >vim + let revlist = reverse(copy(mylist)) + < ]=], name = 'reverse', params = { { 'object', 'any' } }, |