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>
diff --git a/src/dict.c b/src/dict.c
index 7975904..d43ca86 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -1554,7 +1554,7 @@
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 @@
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);
}