mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
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:
@@ -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."));
|
||||
}
|
||||
|
Reference in New Issue
Block a user