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

@@ -2460,11 +2460,11 @@ do_mouse (
};
typval_T rettv;
int doesrange;
(void) call_func((char_u *) tab_page_click_defs[mouse_col].func,
(int) strlen(tab_page_click_defs[mouse_col].func),
&rettv, ARRAY_SIZE(argv), argv,
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
&doesrange, true, NULL, NULL);
(void)call_func((char_u *)tab_page_click_defs[mouse_col].func,
(int)strlen(tab_page_click_defs[mouse_col].func),
&rettv, ARRAY_SIZE(argv), argv, NULL,
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
&doesrange, true, NULL, NULL);
clear_tv(&rettv);
break;
}