mirror of
https://github.com/vim/vim.git
synced 2025-10-23 08:44:20 -04:00
patch 9.1.1232: Vim script is missing the tuple data type
Problem: Vim script is missing the tuple data type Solution: Add support for the tuple data type (Yegappan Lakshmanan) closes: #16776 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
adb703e1b9
commit
9cb865e95b
@@ -1554,7 +1554,7 @@ dict2list(typval_T *argvars, typval_T *rettv, dict2list_T what)
|
||||
return;
|
||||
|
||||
if ((what == DICT2LIST_ITEMS
|
||||
? check_for_string_or_list_or_dict_arg(argvars, 0)
|
||||
? check_for_string_list_tuple_or_dict_arg(argvars, 0)
|
||||
: check_for_dict_arg(argvars, 0)) == FAIL)
|
||||
return;
|
||||
|
||||
@@ -1617,6 +1617,8 @@ f_items(typval_T *argvars, typval_T *rettv)
|
||||
string2items(argvars, rettv);
|
||||
else if (argvars[0].v_type == VAR_LIST)
|
||||
list2items(argvars, rettv);
|
||||
else if (argvars[0].v_type == VAR_TUPLE)
|
||||
tuple2items(argvars, rettv);
|
||||
else
|
||||
dict2list(argvars, rettv, DICT2LIST_ITEMS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user