mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:8.2.0111: VAR_SPECIAL is also used for booleans
Problem: VAR_SPECIAL is also used for booleans.
Solution: Add VAR_BOOL for better type checking.
9b4a15d5db
This commit is contained in:
@@ -286,10 +286,10 @@ bool nlua_pop_typval(lua_State *lstate, typval_T *ret_tv)
|
||||
break;
|
||||
}
|
||||
case LUA_TBOOLEAN: {
|
||||
cur.tv->v_type = VAR_SPECIAL;
|
||||
cur.tv->vval.v_special = (lua_toboolean(lstate, -1)
|
||||
? kSpecialVarTrue
|
||||
: kSpecialVarFalse);
|
||||
cur.tv->v_type = VAR_BOOL;
|
||||
cur.tv->vval.v_bool = (lua_toboolean(lstate, -1)
|
||||
? kBoolVarTrue
|
||||
: kBoolVarFalse);
|
||||
break;
|
||||
}
|
||||
case LUA_TSTRING: {
|
||||
|
Reference in New Issue
Block a user