fix: avoid deprecated usage of vim.validate

This commit is contained in:
Carlo Sala 2025-04-01 10:34:55 +02:00
parent 44d9b58f11
commit 0f7828ddf1
No known key found for this signature in database
GPG Key ID: DA6FB450C1A4FE9A

View File

@ -349,7 +349,11 @@ end
---@param dst_pos string value pos
---@param remove boolean
function M.move_missing_val(src, src_path, src_pos, dst, dst_path, dst_pos, remove)
local ok, err = pcall(vim.validate, {
local ok, err = pcall(function(arr)
for key, value in pairs(arr) do
vim.validate(key, value[1], value[2])
end
end, {
src = { src, "table" },
src_path = { src_path, "string" },
src_pos = { src_pos, "string" },