mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
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)
acf7d73a7f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user