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.
This commit is contained in:
skewb1k
2025-12-10 17:44:05 +03:00
committed by GitHub
parent d2e445e1bd
commit b87bdef2a8
4 changed files with 12 additions and 16 deletions

View File

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