Mercurial > vim
diff src/evalfunc.c @ 29978:34151eb6ae25 v9.0.0327
patch 9.0.0327: items() does not work on a list
Commit: https://github.com/vim/vim/commit/976f859763b215050a03248dbc2bb62fa5d0d059
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 14:34:52 2022 +0100
patch 9.0.0327: items() does not work on a list
Problem: items() does not work on a list. (Sergey Vlasov)
Solution: Make items() work on a list. (closes https://github.com/vim/vim/issues/11013)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 30 Aug 2022 15:45:03 +0200 |
parents | d8fc1effa724 |
children | 0ad8b72af148 |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2029,7 +2029,7 @@ static funcentry_T global_functions[] = ret_number_bool, f_islocked}, {"isnan", 1, 1, FEARG_1, arg1_float_or_nr, ret_number_bool, MATH_FUNC(f_isnan)}, - {"items", 1, 1, FEARG_1, arg1_dict_any, + {"items", 1, 1, FEARG_1, arg1_list_or_dict, ret_list_items, f_items}, {"job_getchannel", 1, 1, FEARG_1, arg1_job, ret_channel, JOB_FUNC(f_job_getchannel)},