vim-patch:7.4.2090

Problem:    Using submatch() in a lambda passed to substitute() is verbose.
Solution:   Use a static list and pass it as an optional argument to the
            function.  Fix memory leak.

df48fb456f
This commit is contained in:
Michael Ennen
2016-12-15 13:27:32 -07:00
parent a0ce663710
commit 7f4848aff4
9 changed files with 150 additions and 65 deletions

View File

@@ -221,11 +221,10 @@ Object nvim_call_function(String fname, Array args, Error *err)
// Call the function
typval_T rettv;
int dummy;
int r = call_func((char_u *) fname.data, (int) fname.size,
&rettv, (int) args.size, vim_args,
int r = call_func((char_u *)fname.data, (int)fname.size,
&rettv, (int)args.size, vim_args, NULL,
curwin->w_cursor.lnum, curwin->w_cursor.lnum, &dummy,
true,
NULL, NULL);
true, NULL, NULL);
if (r == FAIL) {
api_set_error(err, Exception, _("Error calling function."));
}