mirror of
https://github.com/neovim/neovim.git
synced 2026-05-26 23:08:36 +00:00
fix(lua): use even safer and even better error() message conversion
problem:
this crashes neovim:
ondska = setmetatable({}, {__tostring = error})
error(ondska)
solution:
make it not crash neovim
This commit is contained in:
@@ -495,7 +495,7 @@ describe('luaeval()', function()
|
||||
remove_trace(pcall_err(command, [[call luaeval("error('ERROR')")]]))
|
||||
)
|
||||
eq(
|
||||
'Vim(call):E5108: Lua: [NULL]',
|
||||
'Vim(call):E5108: Lua: nil',
|
||||
remove_trace(pcall_err(command, [[call luaeval("error(nil)")]]))
|
||||
)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user