diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-02-24 15:24:38 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-02-24 15:36:08 +0800 |
commit | d9263688bf0282918f5a9801dae8b85e4c85bd7e (patch) | |
tree | 1098bd5e8fb04e17e695ba6201ca05afa846de49 /src/nvim/eval/funcs.c | |
parent | 904d0995837a2569ae640f5253da3dd4569fec6f (diff) | |
download | rneovim-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.c | 2 |
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 |