diff src/terminal.c @ 17606:ff097edaae89 v8.1.1800

patch 8.1.1800: function call functions have too many arguments commit https://github.com/vim/vim/commit/c6538bcc1cdd1fb83732f22fdc69bd9bb66f968a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 3 18:17:11 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Aug 2019 18:30:07 +0200
parents 278583ff5e44
children ba18f78c8529
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3772,7 +3772,7 @@ handle_call_command(term_T *term, channe
     char_u	*func;
     typval_T	argvars[2];
     typval_T	rettv;
-    int		doesrange;
+    funcexe_T	funcexe;
 
     if (item->li_next == NULL)
     {
@@ -3790,11 +3790,11 @@ handle_call_command(term_T *term, channe
     argvars[0].v_type = VAR_NUMBER;
     argvars[0].vval.v_number = term->tl_buffer->b_fnum;
     argvars[1] = item->li_next->li_tv;
-    if (call_func(func, -1, &rettv,
-		2, argvars, /* argv_func */ NULL,
-		/* firstline */ 1, /* lastline */ 1,
-		&doesrange, /* evaluate */ TRUE,
-		/* partial */ NULL, /* selfdict */ NULL) == OK)
+    vim_memset(&funcexe, 0, sizeof(funcexe));
+    funcexe.firstline = 1L;
+    funcexe.lastline = 1L;
+    funcexe.evaluate = TRUE;
+    if (call_func(func, -1, &rettv, 2, argvars, &funcexe) == OK)
     {
 	clear_tv(&rettv);
 	ch_log(channel, "Function %s called", func);