neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 11e0fea8bafaf7693531177c4ebaf733738241f1
parent d189bfaeb2de404455fee699a1c02b8bb8909398
Author: resolritter <17429390+resolritter@users.noreply.github.com>
Date:   Thu,  9 Jun 2022 12:02:32 -0300

fix: correct nlua_wait error message #18867

the message is wrapped in `if (timeout < 0)`, which means 0 is a valid value
Diffstat:
Msrc/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 @@ -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"); } }