diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-02-12 14:16:47 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2026-03-11 18:00:18 +0100 |
| commit | b8a976afdaf0080498e85530fae65a3165f201d5 (patch) | |
| tree | df9889722d148f6d97f3821264a7c0255d5bee8b /runtime/lua/vim/_core/shared.lua | |
| parent | 4aeeaa80273eda1cf4fdb5de4b8ea65a16cefbaf (diff) | |
docs: api, messages, lsp, trust
gen_vimdoc.lua: In prepare for the upcoming release, comment-out the
"Experimental" warning for prerelease features.
Diffstat (limited to 'runtime/lua/vim/_core/shared.lua')
| -rw-r--r-- | runtime/lua/vim/_core/shared.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/lua/vim/_core/shared.lua b/runtime/lua/vim/_core/shared.lua index 1f01b70f2a..da50338d01 100644 --- a/runtime/lua/vim/_core/shared.lua +++ b/runtime/lua/vim/_core/shared.lua @@ -360,7 +360,7 @@ local function key_fn(v, key) return key and key(v) or v end ---- Removes duplicate values from a list-like table in-place. +--- Removes duplicate values from a |lua-list| in-place. --- --- Only the first occurrence of each value is kept. --- The operation is performed in-place and the input table is modified. @@ -383,6 +383,7 @@ end --- -- t is now { {id=1}, {id=2} } --- ``` --- +--- @since 14 --- @generic T --- @param t T[] --- @param key? fun(x: T): any Optional hash function to determine uniqueness of values @@ -482,8 +483,8 @@ local function upper_bound(t, val, lo, hi, key) return lo end ---- Search for a position in a sorted list {t} ---- where {val} can be inserted while keeping the list sorted. +--- Search for a position in a sorted |lua-list| {t} where {val} can be inserted while keeping the +--- list sorted. --- --- Use {bound} to determine whether to return the first or the last position, --- defaults to "lower", i.e., the first position. @@ -514,6 +515,7 @@ end --- print(t[i]) -- { 3, 3, 3 } --- end --- ``` +---@since 14 ---@generic T ---@param t T[] A comparable list. ---@param val T The value to search. |
