commit 55c5d0de262b8a9eb03a65f6e6f45e8d26213eb4
parent adcd9360dfefc7b1e1edb0e86df460e074991c8d
Author: Lukasz Piepiora <lpiepiora@gmail.com>
Date: Mon, 23 Dec 2024 14:08:20 +0100
docs(api): vim.version.range():has() method #31622
Problem:
The :has() method of the vim.version.range() result is not documented
though it's mentioned in examples.
Solution:
Mention it in the range() result doc.
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
@@ -3998,6 +3998,7 @@ vim.version.range({spec}) *vim.version.range()*
(`table?`) A table with the following fields:
• {from} (`vim.Version`)
• {to}? (`vim.Version`)
+ • {has} (`fun(self: vim.VersionRange, version: string|vim.Version)`)
See also: ~
• https://github.com/npm/node-semver#ranges
diff --git a/runtime/lua/vim/version.lua b/runtime/lua/vim/version.lua
@@ -227,8 +227,7 @@ end
---@field to? vim.Version
local VersionRange = {}
---- @private
----
+---@nodoc
---@param version string|vim.Version
function VersionRange:has(version)
if type(version) == 'string' then