vim-patch:8.1.1319: computing function length name in many places

Problem:    Computing function length name in many places.
Solution:   compute name length in call_func().
6ed8819822

In call_func(), reassign "len" param to (int)STRLEN(funcname)
instead of using vim_strsave() which runs strlen().
"len" param is checked for v:lua functions.
call_func() states that strlen() is used if "len" is set to -1.
This commit is contained in:
Jan Edmund Lazo
2020-09-26 15:34:17 -04:00
parent 4edf7b9ff2
commit 2a57dce9f2
5 changed files with 15 additions and 12 deletions

View File

@@ -2483,7 +2483,7 @@ 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),
-1,
&rettv, ARRAY_SIZE(argv), argv, NULL,
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
&doesrange, true, NULL, NULL);