Mercurial > vim
diff src/evalfunc.c @ 20766:821925509d8c v8.2.0935
patch 8.2.0935: flattening a list with existing code is slow
Commit: https://github.com/vim/vim/commit/077a1e670ad69ef4cefc22103ca6635bd269e764
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 8 20:50:43 2020 +0200
patch 8.2.0935: flattening a list with existing code is slow
Problem: Flattening a list with existing code is slow.
Solution: Add flatten(). (Mopp, closes https://github.com/vim/vim/issues/3676)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 08 Jun 2020 21:00:04 +0200 |
parents | d9a2e5dcfd9f |
children | 90b96fa35e4b |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -541,6 +541,7 @@ static funcentry_T global_functions[] = {"filter", 2, 2, FEARG_1, ret_any, f_filter}, {"finddir", 1, 3, FEARG_1, ret_string, f_finddir}, {"findfile", 1, 3, FEARG_1, ret_string, f_findfile}, + {"flatten", 1, 2, FEARG_1, ret_list_any, f_flatten}, {"float2nr", 1, 1, FEARG_1, ret_number, FLOAT_FUNC(f_float2nr)}, {"floor", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_floor)}, {"fmod", 2, 2, FEARG_1, ret_float, FLOAT_FUNC(f_fmod)},