aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-30 13:38:13 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-31 10:49:57 +0800
commit619cb143f93fbf75adde9710415a74d36c8eb63d (patch)
tree9596ca94c741f694adda53e95bb2ec98a3ca8566 /src/nvim/eval.c
parenta1561cbbea55cc74d4dc880585f942f4a114c4b8 (diff)
downloadrneovim-619cb143f93fbf75adde9710415a74d36c8eb63d.tar.gz
rneovim-619cb143f93fbf75adde9710415a74d36c8eb63d.tar.bz2
rneovim-619cb143f93fbf75adde9710415a74d36c8eb63d.zip
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 <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c6
1 files changed, 5 insertions, 1 deletions
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;
}