vim-patch:partial:9.1.1668: items() does not work for Blobs

Problem:  items() does not work for Blobs
Solution: Extend items() to support Blob
          (Yegappan Lakshmanan).

closes: vim/vim#18080

da34f84847

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2026-02-16 20:37:43 +08:00
parent 992543c361
commit cbec4603a0
7 changed files with 150 additions and 50 deletions

View File

@@ -6044,7 +6044,7 @@ M.funcs = {
Return a |List| with all key/index and value pairs of {expr}.
Each |List| item is a list with two items:
- for a |Dict|: the key and the value
- for a |List| or |String|: the index and the value
- for a |List|, |Blob| or |String|: the index and the value
The returned |List| is in arbitrary order for a |Dict|,
otherwise it's in ascending order of the index.
@@ -6057,6 +6057,7 @@ M.funcs = {
endfor
echo items([1, 2, 3])
echo items("foobar")
echo items(0z0102)
<
]=],
name = 'items',