aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-24 15:24:38 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-02-24 15:36:08 +0800
commitd9263688bf0282918f5a9801dae8b85e4c85bd7e (patch)
tree1098bd5e8fb04e17e695ba6201ca05afa846de49 /src/nvim/eval/funcs.c
parent904d0995837a2569ae640f5253da3dd4569fec6f (diff)
downloadrneovim-d9263688bf0282918f5a9801dae8b85e4c85bd7e.tar.gz
rneovim-d9263688bf0282918f5a9801dae8b85e4c85bd7e.tar.bz2
rneovim-d9263688bf0282918f5a9801dae8b85e4c85bd7e.zip
vim-patch:8.2.4627: flatten() does not use maxdepth correctly
Problem: flatten() does not use maxdepth correctly. Solution: Use a recursive implementation. (closes vim/vim#10020) https://github.com/vim/vim/commit/acf7d73a7f5cdd63b34de777a4ce5eb3e2ba0ab3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index 3a58b90f96..6ac94706c7 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -1914,7 +1914,7 @@ static void flatten_common(typval_T *argvars, typval_T *rettv, bool make_copy)
tv_list_ref(list);
}
- tv_list_flatten(list, maxdepth);
+ tv_list_flatten(list, NULL, tv_list_len(list), maxdepth);
}
/// "flatten(list[, {maxdepth}])" function