From 11e0fea8bafaf7693531177c4ebaf733738241f1 Mon Sep 17 00:00:00 2001 From: resolritter <17429390+resolritter@users.noreply.github.com> Date: Thu, 9 Jun 2022 12:02:32 -0300 Subject: [PATCH] fix: correct nlua_wait error message #18867 the message is wrapped in `if (timeout < 0)`, which means 0 is a valid value --- src/nvim/lua/executor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 3ba4d0d70c..bd06123d5f 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -357,7 +357,7 @@ static int nlua_wait(lua_State *lstate) { intptr_t timeout = luaL_checkinteger(lstate, 1); if (timeout < 0) { - return luaL_error(lstate, "timeout must be > 0"); + return luaL_error(lstate, "timeout must be >= 0"); } int lua_top = lua_gettop(lstate); @@ -384,7 +384,7 @@ static int nlua_wait(lua_State *lstate) if (lua_top >= 3 && !lua_isnil(lstate, 3)) { interval = luaL_checkinteger(lstate, 3); if (interval < 0) { - return luaL_error(lstate, "interval must be > 0"); + return luaL_error(lstate, "interval must be >= 0"); } }