fix(version): fix vim.version().prerelease

fixes #28782 (when backported)
This commit is contained in:
bfredl
2024-05-16 20:07:45 +02:00
committed by Björn Linse
parent a664246171
commit d049752e45
2 changed files with 6 additions and 2 deletions

View File

@@ -260,7 +260,11 @@ fixdict(1 + #version)
for _, item in ipairs(version) do
-- NB: all items are mandatory. But any error will be less confusing
-- with placeholder vim.NIL (than invalid mpack data)
put(item[1], item[2] or vim.NIL)
local val = item[2]
if val == nil then
val = vim.NIL
end
put(item[1], val)
end
put('build', version_build)