|  | Commit message (Collapse) | Author | Age | 
|---|
| | 
| 
| 
| 
| 
| 
| | - The previous commit lost information in the tests. Instead, add some
  more "normalization" substitutions in pcall_err(), so that the general
  shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches() | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Can be reproduced with a script like this:
-- in some lua file
vim.fn.timer_start(10, function() error("uh....") end)
-- will cause neovim to crash with the following error.
PANIC: unprotected error in call to Lua API
        (nlua_CFunction_func_call failed.)
After this, it will instead print the error message
from the top of the stack, like so.
tmp/error_nvim.lua:10: uh...
Also added an example test. Previously this test
caused the embedded nvim to panic. | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | vim-patch:8.2.1054: not so easy to pass a lua function to Vim
vim-patch:8.2.1084: Lua: registering function has useless code
I think I have also opened up the possibility for people to use these
callbacks elsewhere, since I've added a new struct that we should be
able to use.
Also, this should allow us to determine what the state of a list is in
Lua or a dictionary in Lua, since we now can track the luaref as we go. | 
| | |  | 
| | 
| 
| 
| | Also simplify error messages when calling lua from vimL. | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | - Return VimL errors instead of generic errors for:
  - nvim_call_function
  - nvim_call_dict_function
- Fix tests which were silently broken before this change.
This violates #6150 where we agreed not to translate API errors.  But
that can be fixed later. | 
| | |  | 
| | |  | 
| | |  | 
| | 
| 
| | Missing: updates to various lists. | 
| | |  | 
| | |  | 
|  |  |