From 3b6084ddf4f0d49fb0e5d135919c9daacea2a46d Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 5 Jun 2025 11:31:51 +0100 Subject: fix: type fixes Type fixes caught by emmylua --- runtime/lua/vim/_system.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'runtime/lua/vim/_system.lua') diff --git a/runtime/lua/vim/_system.lua b/runtime/lua/vim/_system.lua index e40229de63..23a32fbd49 100644 --- a/runtime/lua/vim/_system.lua +++ b/runtime/lua/vim/_system.lua @@ -79,22 +79,19 @@ function SystemObj:_timeout(signal) self:kill(signal or SIG.TERM) end --- Use max 32-bit signed int value to avoid overflow on 32-bit systems. #31633 -local MAX_TIMEOUT = 2 ^ 31 - 1 - --- @param timeout? integer --- @return vim.SystemCompleted function SystemObj:wait(timeout) local state = self._state - local done = vim.wait(timeout or state.timeout or MAX_TIMEOUT, function() + local done = vim.wait(timeout or state.timeout or vim._maxint, function() return state.result ~= nil end, nil, true) if not done then -- Send sigkill since this cannot be caught self:_timeout(SIG.KILL) - vim.wait(timeout or state.timeout or MAX_TIMEOUT, function() + vim.wait(timeout or state.timeout or vim._maxint, function() return state.result ~= nil end, nil, true) end -- cgit v1.3-3-g829e