aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-05-21 15:12:35 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-08-12 22:31:18 +0100
commit4042ae5a2bc4bbca608ebb196a3d54a78d6c100c (patch)
tree6da940b00ff0f62ef3a2ebdeb730726e0f69755b /src/nvim/lua/executor.c
parent60dd76c7e29e75dee641f93483eb6e5c2afb28e4 (diff)
downloadrneovim-4042ae5a2bc4bbca608ebb196a3d54a78d6c100c.tar.gz
rneovim-4042ae5a2bc4bbca608ebb196a3d54a78d6c100c.tar.bz2
rneovim-4042ae5a2bc4bbca608ebb196a3d54a78d6c100c.zip
vim-patch:8.1.1800: function call functions have too many arguments
Problem: Function call functions have too many arguments. Solution: Pass values in a funcexe_T struct. https://github.com/vim/vim/commit/c6538bcc1cdd1fb83732f22fdc69bd9bb66f968a Use FUNCEXE_INIT to initialize funcexe_T instances. call_callback() and other Vim listener related stuff is N/A.
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 5799c3ee98..cb3cb6e73e 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -780,13 +780,13 @@ int nlua_call(lua_State *lstate)
try_start();
typval_T rettv;
- int dummy;
+ funcexe_T funcexe = FUNCEXE_INIT;
+ funcexe.firstline = curwin->w_cursor.lnum;
+ funcexe.lastline = curwin->w_cursor.lnum;
+ funcexe.evaluate = true;
// call_func() retval is deceptive, ignore it. Instead we set `msg_list`
// (TRY_WRAP) to capture abort-causing non-exception errors.
- (void)call_func(name, (int)name_len, &rettv, nargs,
- vim_args, NULL,
- curwin->w_cursor.lnum, curwin->w_cursor.lnum,
- &dummy, true, NULL, NULL);
+ (void)call_func(name, (int)name_len, &rettv, nargs, vim_args, &funcexe);
if (!try_end(&err)) {
nlua_push_typval(lstate, &rettv, false);
}