fix(lua): relax vim.wait() timeout validation (#36907)

fix(lua): relax `vim.wait()` timeout validation #36900

Problem:
After bc0635a9fc `vim.wait()` rejects floats
and NaN values.

Solution:
Restore the prior behavior, while still supporting `math.huge`. Update
tests to cover float case.

(cherry picked from commit b87bdef2a8)
This commit is contained in:
skewb1k
2025-12-10 19:09:24 +03:00
committed by GitHub
parent ec9e337479
commit 83c589d95f
4 changed files with 12 additions and 16 deletions

View File

@@ -3636,7 +3636,7 @@ stack traceback:
true,
exec_lua [[
local start_time = vim.uv.hrtime()
vim.wait(50, nil)
vim.wait(50.1, nil)
return vim.uv.hrtime() - start_time > 25000
]]
)