From 619cb143f93fbf75adde9710415a74d36c8eb63d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 30 Jul 2024 13:38:13 +0800 Subject: vim-patch:9.1.0415: Some functions are not tested Problem: Some functions are not tested Solution: Add a few more tests, fix a few minor problems (Yegappan Lakshmanan) closes: vim/vim#14789 https://github.com/vim/vim/commit/fe424d13ef6e5486923f23f15bb6951e3079412e Co-authored-by: Yegappan Lakshmanan --- src/nvim/eval.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 176d75b04d..d1f9adf2d0 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -3678,6 +3678,10 @@ static int eval_method(char **const arg, typval_T *const rettv, evalarg_T *const } xfree(tofree); + if (alias != NULL) { + xfree(alias); + } + return ret; } @@ -3815,7 +3819,7 @@ static int check_can_index(typval_T *rettv, bool evaluate, bool verbose) /// slice() function void f_slice(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) { - if (check_can_index(argvars, true, false) != OK) { + if (check_can_index(&argvars[0], true, false) != OK) { return; } -- cgit