forked from aniani/vim
patch 9.1.0848: if_lua: v:false/v:true are not evaluated to boolean
Problem: if_lua: v:false/v:true are not evaluated to boolean Solution: Use lua_pushboolean() instead of lua_pushinteger(). (zeertzjq) fixes: #15994 closes: #11419 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a14c457cad
commit
50732c7ba6
@@ -595,7 +595,7 @@ luaV_pushtypval(lua_State *L, typval_T *tv)
|
||||
case VAR_BOOL:
|
||||
case VAR_SPECIAL:
|
||||
if (tv->vval.v_number <= VVAL_TRUE)
|
||||
lua_pushinteger(L, (int) tv->vval.v_number);
|
||||
lua_pushboolean(L, (int) tv->vval.v_number);
|
||||
else
|
||||
lua_pushnil(L);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user