From 88887a7be707773f908dd6e597f0293d3c1a0faa Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Thu, 17 Aug 2023 16:38:56 +0100 Subject: docs(builtin): fix some missing lines (#24759) Some things got chopped off in the PR that removed method syntax examples. These were all that I found. --- runtime/lua/vim/_meta/vimfn.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index d1c90249ed..ce325ce1f8 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -570,6 +570,8 @@ function vim.fn.bufloaded(buf) end --- 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) --- vim --- echo bufname("#") " alternate buffer name @@ -4426,6 +4428,9 @@ function vim.fn.insert(object, item, idx) end function vim.fn.interrupt() end --- Bitwise invert. The argument is converted to a number. A +--- List, Dict or Float argument causes an error. Example: >vim +--- let bits = invert(bits) +--- < --- --- @param expr any --- @return any @@ -6761,6 +6766,9 @@ function vim.fn.resolve(filename) end --- {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)) +--- < --- --- @param object any --- @return any -- cgit