aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt36
1 files changed, 18 insertions, 18 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index dc1a4bb35d..3561c77dd5 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -2029,6 +2029,23 @@ vim.is_callable({f}) *vim.is_callable()*
Return: ~
(`boolean`) `true` if `f` is callable, else `false`
+vim.islist({t}) *vim.islist()*
+ Tests if `t` is a "list": a table indexed only by contiguous integers
+ starting from 1 (what |lua-length| calls a "regular array").
+
+ Empty table `{}` is a list, unless it was created by |vim.empty_dict()| or
+ returned as a dict-like |API| or Vimscript result, for example from
+ |rpcrequest()| or |vim.fn|.
+
+ Parameters: ~
+ • {t} (`table?`)
+
+ Return: ~
+ (`boolean`) `true` if list-like table, else `false`.
+
+ See also: ~
+ • |vim.tbl_isarray()|
+
vim.list_contains({t}, {value}) *vim.list_contains()*
Checks if a list-like table (integer keys without gaps) contains `value`.
@@ -2284,7 +2301,7 @@ vim.tbl_isarray({t}) *vim.tbl_isarray()*
non-contiguous).
If the indexes start from 1 and are contiguous then the array is also a
- list. |vim.tbl_islist()|
+ list. |vim.islist()|
Empty table `{}` is an array, unless it was created by |vim.empty_dict()|
or returned as a dict-like |API| or Vimscript result, for example from
@@ -2311,23 +2328,6 @@ vim.tbl_isempty({t}) *vim.tbl_isempty()*
See also: ~
• https://github.com/premake/premake-core/blob/master/src/base/table.lua
-vim.tbl_islist({t}) *vim.tbl_islist()*
- Tests if `t` is a "list": a table indexed only by contiguous integers
- starting from 1 (what |lua-length| calls a "regular array").
-
- Empty table `{}` is a list, unless it was created by |vim.empty_dict()| or
- returned as a dict-like |API| or Vimscript result, for example from
- |rpcrequest()| or |vim.fn|.
-
- Parameters: ~
- • {t} (`table`)
-
- Return: ~
- (`boolean`) `true` if list-like table, else `false`.
-
- See also: ~
- • |vim.tbl_isarray()|
-
vim.tbl_keys({t}) *vim.tbl_keys()*
Return a list of all keys used in a table. However, the order of the
return table of keys is not guaranteed.