diff options
author | resolritter <17429390+resolritter@users.noreply.github.com> | 2022-06-09 12:02:32 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 08:02:32 -0700 |
commit | 11e0fea8bafaf7693531177c4ebaf733738241f1 (patch) | |
tree | 53b3bdbe12f2bd5dc8d50556363a52ac6968730b /src/nvim/lua/executor.c | |
parent | d189bfaeb2de404455fee699a1c02b8bb8909398 (diff) | |
download | rneovim-11e0fea8bafaf7693531177c4ebaf733738241f1.tar.gz rneovim-11e0fea8bafaf7693531177c4ebaf733738241f1.tar.bz2 rneovim-11e0fea8bafaf7693531177c4ebaf733738241f1.zip |
fix: correct nlua_wait error message #18867
the message is wrapped in `if (timeout < 0)`, which means 0 is a valid value
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 4 |
1 files 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"); } } |