mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(eval): skip over v:lua properly (#27517)
Problem: Error when parsing v:lua in a ternary expression. Solution: Set rettv->v_type for v:lua even if not evaluating.
This commit is contained in:
@@ -538,6 +538,8 @@ describe('v:lua', function()
|
||||
eq('\tbadval', eval("v:lua.require'leftpad'('badval')"))
|
||||
eq(9003, eval("v:lua.require'bar'.doit()"))
|
||||
eq(9004, eval("v:lua.require'baz-quux'.doit()"))
|
||||
eq(9003, eval("1 ? v:lua.require'bar'.doit() : v:lua.require'baz-quux'.doit()"))
|
||||
eq(9004, eval("0 ? v:lua.require'bar'.doit() : v:lua.require'baz-quux'.doit()"))
|
||||
end)
|
||||
|
||||
it('throw errors for invalid use', function()
|
||||
|
Reference in New Issue
Block a user