diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-12-15 13:27:32 -0700 |
---|---|---|
committer | Michael Ennen <mike.ennen@gmail.com> | 2017-02-14 17:38:17 -0700 |
commit | 7f4848aff47b7b2a85be5f83007846934ef9fd90 (patch) | |
tree | 3214b1b634132ecdb03a6a338d6c9dab174c775c /src/nvim/normal.c | |
parent | a0ce66371096db21f341f061df8c1b7b4d9e38fe (diff) | |
download | rneovim-7f4848aff47b7b2a85be5f83007846934ef9fd90.tar.gz rneovim-7f4848aff47b7b2a85be5f83007846934ef9fd90.tar.bz2 rneovim-7f4848aff47b7b2a85be5f83007846934ef9fd90.zip |
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.
https://github.com/vim/vim/commit/df48fb456fb6bf63d94cad9b302ff01d8ee8d311
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 5d7a8faeba..c2218d58be 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -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; } |