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

@@ -4901,7 +4901,7 @@ function vim.fn.isnan(expr) end
--- 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.
---
@@ -4914,6 +4914,7 @@ function vim.fn.isnan(expr) end
--- endfor
--- echo items([1, 2, 3])
--- echo items("foobar")
--- echo items(0z0102)
--- <
---
--- @param expr table|string