1
0
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:
zeertzjq
2024-11-09 18:30:10 +01:00
committed by Christian Brabandt
parent a14c457cad
commit 50732c7ba6
4 changed files with 8 additions and 6 deletions

View File

@@ -299,7 +299,7 @@ func Test_unicode()
endfunc
" Test vim.eval() with various types.
func Test_python3_vim_val()
func Test_python3_vim_eval()
call assert_equal("\n8", execute('py3 print(vim.eval("3+5"))'))
call assert_equal("\n3.140000", execute('py3 print(vim.eval("1.01+2.13"))'))
call assert_equal("\n0.000000", execute('py3 print(vim.eval("0.0/(1.0/0.0)"))'))